to 'out_mbox_free'
- 'goto out_mbox_free' must be replaced by 'goto out', otherwise the
'[pcc_]mbox_free_channel()' call will be missed.
Fixes: 2ca492e22cb7 ("hwmon: (xgene) Fix crash when alarm occurs before driver
probe")
Signed-off-by: Christophe JAILLET
---
drivers/hwmon/xgene-hw
: Fix ADC[3:6] readings")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/iio/adc/twl4030-madc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/twl4030-madc.c b/drivers/iio/adc/twl4030-madc.c
index 80ab2ed70b85..32d
: Fix ADC[3:6] readings")
Signed-off-by: Christophe JAILLET
---
drivers/iio/adc/twl4030-madc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/twl4030-madc.c b/drivers/iio/adc/twl4030-madc.c
index 80ab2ed70b85..32db23d9a483 100644
--- a/drivers/iio/a
If we can not enable the regulator, go through the error handling path
instead of silently continuing.
Fixes: 7cc97d77ee8a ("iio: adc: twl4030: Fix ADC[3:6] readings")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
This patch is highly speculative.
I do
If we can not enable the regulator, go through the error handling path
instead of silently continuing.
Fixes: 7cc97d77ee8a ("iio: adc: twl4030: Fix ADC[3:6] readings")
Signed-off-by: Christophe JAILLET
---
This patch is highly speculative.
I don't find logical to return an error if we
If 'devm_regulator_get()' fails, we should go through the existing error
handling path instead of returning directly, as done is all the other
error handling paths in this function.
Fixes: 7cc97d77ee8a ("iio: adc: twl4030: Fix ADC[3:6] readings")
Signed-off-by: Christophe JAILLET <ch
If 'devm_regulator_get()' fails, we should go through the existing error
handling path instead of returning directly, as done is all the other
error handling paths in this function.
Fixes: 7cc97d77ee8a ("iio: adc: twl4030: Fix ADC[3:6] readings")
Signed-off-by: Christophe JAILLET
--
dling path
- missing function in the error handling path
- spurious pattern (IMO) if unable to enable a regulator
I have splitted them in 3 parts.
Christophe JAILLET (3):
iio: adc: twl4030: Fix an error handling path in
'twl4030_madc_probe()'
iio: adc: twl4030: Disable the vusb3v1
dling path
- missing function in the error handling path
- spurious pattern (IMO) if unable to enable a regulator
I have splitted them in 3 parts.
Christophe JAILLET (3):
iio: adc: twl4030: Fix an error handling path in
'twl4030_madc_probe()'
iio: adc: twl4030: Disable the vusb3v1
will
be handled by 'rtl8192_usb_prob()' directly.
The calling graph is:
rtl8192_usb_probe
--> rtl8192_init
--> rtl8192_usb_initendpoints
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
This patch is compile tested and the corresponding looks a bit tricky
will
be handled by 'rtl8192_usb_prob()' directly.
The calling graph is:
rtl8192_usb_probe
--> rtl8192_init
--> rtl8192_usb_initendpoints
Signed-off-by: Christophe JAILLET
---
This patch is compile tested and the corresponding looks a bit tricky.
So, review carefully :)
---
drivers/s
is:
rtl8192_usb_probe
--> rtl8192_init
--> rtl8192_usb_initendpoints
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
The error handling path in 'rtl8192_usb_probe' must also be fixed because
it is bogus. Will do that in another patch.
---
drivers/stag
is:
rtl8192_usb_probe
--> rtl8192_init
--> rtl8192_usb_initendpoints
Signed-off-by: Christophe JAILLET
---
The error handling path in 'rtl8192_usb_probe' must also be fixed because
it is bogus. Will do that in another patch.
---
drivers/staging/rtl8192u/r8192U_core.c | 4
1 file chan
This is odd to call 'pci_disable_device()' in an error path before a
coresponding successful 'pci_enable_device()'.
Return directly instead.
Fixes: 77e0be12100a ("V4L/DVB (4176): Bug-fix: Fix memory overflow")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
--
This is odd to call 'pci_disable_device()' in an error path before a
coresponding successful 'pci_enable_device()'.
Return directly instead.
Fixes: 77e0be12100a ("V4L/DVB (4176): Bug-fix: Fix memory overflow")
Signed-off-by: Christophe JAILLET
---
drivers/media/pci/bt8xx/bt878.c
Le 22/09/2017 à 00:19, Colin King a écrit :
From: Colin Ian King
Don't populate the read-only arrays dec32table and dec64table on the
stack, instead make them both static const. Makes the object code
smaller by over 10K bytes:
10k? Wouaouh! This is way much more than
Le 22/09/2017 à 00:19, Colin King a écrit :
From: Colin Ian King
Don't populate the read-only arrays dec32table and dec64table on the
stack, instead make them both static const. Makes the object code
smaller by over 10K bytes:
10k? Wouaouh! This is way much more than what you usually win with
All the error handling paths 'goto error', except this one.
We should also go to error in this case, or some resources will be
leaking.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/net/ethernet/broadcom/cnic.c | 2 +-
1 file changed, 1 insertion(+), 1 de
All the error handling paths 'goto error', except this one.
We should also go to error in this case, or some resources will be
leaking.
Signed-off-by: Christophe JAILLET
---
drivers/net/ethernet/broadcom/cnic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net
In case of error, 'dma_map_sg()' returns 0, not a negative value.
There is BUG_ON() in 'dma_map_sg_attrs()' which makes sure of that.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/rapidio/devices/rio_mport_cdev.c | 2 +-
1 file changed, 1 insertion(+), 1 de
If 'dma_map_sg()', we should branch to the existing error handling path to
free some resources before returning.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/rapidio/devices/rio_mport_cdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
In case of error, 'dma_map_sg()' returns 0, not a negative value.
There is BUG_ON() in 'dma_map_sg_attrs()' which makes sure of that.
Signed-off-by: Christophe JAILLET
---
drivers/rapidio/devices/rio_mport_cdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
If 'dma_map_sg()', we should branch to the existing error handling path to
free some resources before returning.
Signed-off-by: Christophe JAILLET
---
drivers/rapidio/devices/rio_mport_cdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/rapidio/devices
looks trivial to me.
But the 2nd one should require more attention, IMO. The existing error
handling was dead code because 'dma_map_sg()' can not return -EFAULT. So
this error handling code has never been executed/tested and I can't test it
myself.
Christophe JAILLET (2):
rapidio: Fix resources leak
looks trivial to me.
But the 2nd one should require more attention, IMO. The existing error
handling was dead code because 'dma_map_sg()' can not return -EFAULT. So
this error handling code has never been executed/tested and I can't test it
myself.
Christophe JAILLET (2):
rapidio: Fix resources leak
If a memory allocation fails, we should go through the error handling path,
as done elsewhere in this 'for' loop.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/regulator/qcom_spmi-regulator.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff
If a memory allocation fails, we should go through the error handling path,
as done elsewhere in this 'for' loop.
Signed-off-by: Christophe JAILLET
---
drivers/regulator/qcom_spmi-regulator.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/qcom_spmi
In order to avoid code duplication and to be more consistent with the
other error handling paths in this function, we should 'goto errout'.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/tty/synclink.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
In order to avoid code duplication and to be more consistent with the
other error handling paths in this function, we should 'goto errout'.
Signed-off-by: Christophe JAILLET
---
drivers/tty/synclink.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/tty/synclink.c b
The error handling path at label 'accept_err' already performs these
'sock_release()' and 'mutex_unlock()' calls. The order is reversed, but
it is not important.
So avoid code duplication and 'goto accept_err'.
While at it, add some missing spaces around a '='.
Signed-off-by: Christophe JAILLET
The error handling path at label 'accept_err' already performs these
'sock_release()' and 'mutex_unlock()' calls. The order is reversed, but
it is not important.
So avoid code duplication and 'goto accept_err'.
While at it, add some missing spaces around a '='.
Signed-off-by: Christophe JAILLET
If the string passed in '--time' is invalid, or if failed to set
libtraceevent function resolver, we must do some cleanup before leaving.
As in the other error handling paths of this function.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
tools/perf/builtin-script
If the string passed in '--time' is invalid, or if failed to set
libtraceevent function resolver, we must do some cleanup before leaving.
As in the other error handling paths of this function.
Signed-off-by: Christophe JAILLET
---
tools/perf/builtin-script.c | 6 --
1 file changed, 4
If the string passed in '--time' is invalid, we must do some cleanup
before leaving. As in the other error handling paths of this function.
Fixes: 2a865bd8 ("perf kmem: Add option to specify time window of interest")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.f
If the string passed in '--time' is invalid, we must do some cleanup
before leaving. As in the other error handling paths of this function.
Fixes: 2a865bd8 ("perf kmem: Add option to specify time window of interest")
Signed-off-by: Christophe JAILLET
---
tools/perf/builtin-kmem.c
mcasp: Add set_tdm_slots() support")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
sound/soc/davinci/davinci-mcasp.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/davinci/davinci-mcasp.c
b/sound/soc/davinci/davinci-mcasp.c
in
mcasp: Add set_tdm_slots() support")
Signed-off-by: Christophe JAILLET
---
sound/soc/davinci/davinci-mcasp.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/davinci/davinci-mcasp.c
b/sound/soc/davinci/davinci-mcasp.c
index f395bbc7c354..23b0da7df1f2 100644
-
All error handling paths 'goto fail' in this function.
If 'scsi_register()' fails, we should also go there, otherwise a
'pci_dev_put(pdev)' will be missing.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
In order to keep consistance with the rest of the file, I've i
All error handling paths 'goto fail' in this function.
If 'scsi_register()' fails, we should also go there, otherwise a
'pci_dev_put(pdev)' will be missing.
Signed-off-by: Christophe JAILLET
---
In order to keep consistance with the rest of the file, I've ignored
checkpatch warnings about spaces
If this sanity check fails, we must free the memory that has already been
allocated.
So we must go to 'err' as in the other error handling parth of this
function.
Fixes: 1a7dd6e2f192 ("ASoC: topology: Allow a widget to have multiple enum
controls")
Signed-off-by: Christop
If this sanity check fails, we must free the memory that has already been
allocated.
So we must go to 'err' as in the other error handling parth of this
function.
Fixes: 1a7dd6e2f192 ("ASoC: topology: Allow a widget to have multiple enum
controls")
Signed-off-by: Christophe JAILLET
ones.
Fixes: 1a7dd6e2f192 ("ASoC: topology: Allow a widget to have multiple enum
controls")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
sound/soc/soc-topology.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-
ones.
Fixes: 1a7dd6e2f192 ("ASoC: topology: Allow a widget to have multiple enum
controls")
Signed-off-by: Christophe JAILLET
---
sound/soc/soc-topology.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index dd471d2c0266..24
All error handling paths in this function go through
'iscsi_host_dec_session_cnt()' except this one.
Fix it and properly decrement the number of active sessions in such a case.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/scsi/libiscsi.c | 2 +-
1 file chan
All error handling paths in this function go through
'iscsi_host_dec_session_cnt()' except this one.
Fix it and properly decrement the number of active sessions in such a case.
Signed-off-by: Christophe JAILLET
---
drivers/scsi/libiscsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
If 'dmam_alloc_attrs()' fails, we must go through the error handling code,
as done elsewhere in this function. Otherwise, there is a resource leak.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
I'm also puzzled by the 'framebuffer_alloc()' call a few lines above
If 'dmam_alloc_attrs()' fails, we must go through the error handling code,
as done elsewhere in this function. Otherwise, there is a resource leak.
Signed-off-by: Christophe JAILLET
---
I'm also puzzled by the 'framebuffer_alloc()' call a few lines above.
'ret' is known to be 0 at this point. I
Le 11/09/2017 à 21:52, Jens Axboe a écrit :
On 09/11/2017 01:43 PM, Christophe JAILLET wrote:
If the 'kmalloc' fails, we must go through the existing error handling
path.
Looks good to me, probably wants a
Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-spe
Le 11/09/2017 à 21:52, Jens Axboe a écrit :
On 09/11/2017 01:43 PM, Christophe JAILLET wrote:
If the 'kmalloc' fails, we must go through the existing error handling
path.
Looks good to me, probably wants a
Fixes: 52ebea749aae ("writeback: make backing_dev_info host cgroup-spe
All other error handling paths in this function go through the 'error'
label. This one should do the same.
Fixes: 9cc9a5cb176c ("datapath: Avoid using stack larger than 1024.")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
I think that the comment above th
All other error handling paths in this function go through the 'error'
label. This one should do the same.
Fixes: 9cc9a5cb176c ("datapath: Avoid using stack larger than 1024.")
Signed-off-by: Christophe JAILLET
---
I think that the comment above the function could be improved. It
If the 'kmalloc' fails, we must go through the existing error handling
path.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
mm/backing-dev.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index f028a9
If the 'kmalloc' fails, we must go through the existing error handling
path.
Signed-off-by: Christophe JAILLET
---
mm/backing-dev.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index f028a9a472fd..e19606bb41a0 100644
--- a/mm
All other error handling paths in this function go through the 'error'
label. This one should do the same.
Fixes: 9cc9a5cb176c ("datapath: Avoid using stack larger than 1024.")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
I think that the comment above th
All other error handling paths in this function go through the 'error'
label. This one should do the same.
Fixes: 9cc9a5cb176c ("datapath: Avoid using stack larger than 1024.")
Signed-off-by: Christophe JAILLET
---
I think that the comment above the function could be improved. It
If this memory allocation fails, we must release some resources, as
already done in the code below and above.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
v2: linux-me...@vger.kernel.org added in cc
---
samples/v4l/v4l2-pci-skeleton.c | 6 --
1 file chan
If this memory allocation fails, we must release some resources, as
already done in the code below and above.
Signed-off-by: Christophe JAILLET
---
v2: linux-me...@vger.kernel.org added in cc
---
samples/v4l/v4l2-pci-skeleton.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff
If this memory allocation fails, we must release some resources, as
already done in the code below and above.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
samples/v4l/v4l2-pci-skeleton.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/s
If this memory allocation fails, we must release some resources, as
already done in the code below and above.
Signed-off-by: Christophe JAILLET
---
samples/v4l/v4l2-pci-skeleton.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/samples/v4l/v4l2-pci-skeleton.c b/samples
If 'btrfs_alloc_path()' fails, we must free the resourses already
allocated, as done in the other error handling paths in this function.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
fs/btrfs/tests/free-space-tree-tests.c | 3 ++-
1 file changed, 2 insertions
If 'btrfs_alloc_path()' fails, we must free the resourses already
allocated, as done in the other error handling paths in this function.
Signed-off-by: Christophe JAILLET
---
fs/btrfs/tests/free-space-tree-tests.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs
We should go through the error handling path to decrease the
'framebuffer_references' as done everywhere else in this function.
Fixes: 2e2adb05736c ("drm/i915: Add render decompression support")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
driv
We should go through the error handling path to decrease the
'framebuffer_references' as done everywhere else in this function.
Fixes: 2e2adb05736c ("drm/i915: Add render decompression support")
Signed-off-by: Christophe JAILLET
---
drivers/gpu/drm/i915/intel_display.c | 2 +-
1 file
If 'clk_prepare_enable()' fails, we must 'put' the corresponding clock.
Othewise, there is a resource leak.
Fixes: f5c97c7b0438 ("ASoC: samsung: i2s: Handle return value of
clk_prepare_enable.")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
I'm no
If 'clk_prepare_enable()' fails, we must 'put' the corresponding clock.
Othewise, there is a resource leak.
Fixes: f5c97c7b0438 ("ASoC: samsung: i2s: Handle return value of
clk_prepare_enable.")
Signed-off-by: Christophe JAILLET
---
I'm not 100% confident in this patch.
It is mostl
If 'clk_prepare_enable()' fails, we must 'put' the corresponding clock.
Fixes: 4d26f012ab59 ("mtd: nand: lpc32xx_mlc: Handle return value of
clk_prepare_enable.")
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
Labels in the error handling path could be rena
If 'clk_prepare_enable()' fails, we must 'put' the corresponding clock.
Fixes: 4d26f012ab59 ("mtd: nand: lpc32xx_mlc: Handle return value of
clk_prepare_enable.")
Signed-off-by: Christophe JAILLET
---
Labels in the error handling path could be renamed, but it does not worth
the ef
Le 31/08/2017 à 12:38, Mark Brown a écrit :
On Thu, Aug 31, 2017 at 12:31:33PM +0200, Takashi Iwai wrote:
This is again a typical problem by such a trivial fix patch: the code
looks as if it were trivial and correct, buried in a patch series that
easily leads to the oversight by the
Le 31/08/2017 à 12:38, Mark Brown a écrit :
On Thu, Aug 31, 2017 at 12:31:33PM +0200, Takashi Iwai wrote:
This is again a typical problem by such a trivial fix patch: the code
looks as if it were trivial and correct, buried in a patch series that
easily leads to the oversight by the
If 'clk_prepare_enable()' fails, we must release some resources before
returning. Add a new label in the existing error handling path and 'goto'
there.
Fixes: 260ea95cc027 ("ASoC: atmel: ac97c: Handle return value of
clk_prepare_enable.")
Signed-off-by: Christophe JAILLET <ch
If 'clk_prepare_enable()' fails, we must release some resources before
returning. Add a new label in the existing error handling path and 'goto'
there.
Fixes: 260ea95cc027 ("ASoC: atmel: ac97c: Handle return value of
clk_prepare_enable.")
Signed-off-by: Christophe JAILLET
---
s
The .release function of driver_ktype is 'driver_release()'.
This function frees the container_of this kobject.
So, this memory must not be freed explicitly in the error handling path of
'bus_add_driver()'. Otherwise a double free will occur.
Signed-off-by: Christophe JAILLET <christophe.j
The .release function of driver_ktype is 'driver_release()'.
This function frees the container_of this kobject.
So, this memory must not be freed explicitly in the error handling path of
'bus_add_driver()'. Otherwise a double free will occur.
Signed-off-by: Christophe JAILLET
---
I have left
Le 28/08/2017 à 01:09, Waskiewicz Jr, Peter a écrit :
On 8/27/17 2:42 AM, Christophe JAILLET wrote:
Check memory allocation failures and return -ENOMEM in such cases, as
already done for other memory allocations in this function.
This avoids NULL pointers dereference.
Signed-off
Le 28/08/2017 à 01:09, Waskiewicz Jr, Peter a écrit :
On 8/27/17 2:42 AM, Christophe JAILLET wrote:
Check memory allocation failures and return -ENOMEM in such cases, as
already done for other memory allocations in this function.
This avoids NULL pointers dereference.
Signed-off
Check memory allocation failures and return -ENOMEM in such cases, as
already done above for another memory allocation.
This avoids NULL pointers dereference.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
sound/soc/davinci/davinci-mcasp.c | 4
1 file chan
Check memory allocation failures and return -ENOMEM in such cases, as
already done above for another memory allocation.
This avoids NULL pointers dereference.
Signed-off-by: Christophe JAILLET
---
sound/soc/davinci/davinci-mcasp.c | 4
1 file changed, 4 insertions(+)
diff --git a/sound
Check memory allocation failures and return -ENOMEM in such cases, as
already done for other memory allocations in this function.
This avoids NULL pointers dereference.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/net/ethernet/intel/igb/igb_main.c | 2 ++
Check memory allocation failures and return -ENOMEM in such cases, as
already done for other memory allocations in this function.
This avoids NULL pointers dereference.
Signed-off-by: Christophe JAILLET
---
drivers/net/ethernet/intel/igb/igb_main.c | 2 ++
1 file changed, 2 insertions(+)
diff
Check memory allocation failures and return -ENOMEM in such cases, as
already done few lines below for another memory allocation.
This avoids NULL pointers dereference.
Fixes: 14e494542636 ("libnvdimm, btt: BTT updates for UEFI 2.7 format")
Signed-off-by: Christophe JAILLET <ch
Check memory allocation failures and return -ENOMEM in such cases, as
already done few lines below for another memory allocation.
This avoids NULL pointers dereference.
Fixes: 14e494542636 ("libnvdimm, btt: BTT updates for UEFI 2.7 format")
Signed-off-by: Christophe JAILLET
---
driv
Check memory allocation failures and return -ENOMEM in such cases, as
already done few lines above for another memory allocation.
This avoids NULL pointers dereference.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/iio/multiplexer/iio-mux.c | 6 ++
Check memory allocation failures and return -ENOMEM in such cases, as
already done few lines above for another memory allocation.
This avoids NULL pointers dereference.
Signed-off-by: Christophe JAILLET
---
drivers/iio/multiplexer/iio-mux.c | 6 ++
1 file changed, 6 insertions(+)
diff
Check memory allocation failure and return -ENOMEM in such a case, as
already done few lines below for another memory allocation.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c | 2 ++
1 file changed, 2 inse
Check memory allocation failure and return -ENOMEM in such a case, as
already done few lines below for another memory allocation.
Signed-off-by: Christophe JAILLET
---
drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet
Check memory allocation failure and return -ENOMEM in such a case, as
already done few lines below for another memory allocation.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/usb/chipidea/ci_hdrc_usb2.c | 2 ++
1 file changed, 2 insertions(+)
diff
Check memory allocation failure and return -ENOMEM in such a case, as
already done few lines below for another memory allocation.
Signed-off-by: Christophe JAILLET
---
drivers/usb/chipidea/ci_hdrc_usb2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c
Check memory allocation failure and return -ENOMEM in such a case.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/media/i2c/smiapp/smiapp-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c
b/drivers/media/i2c/
Check memory allocation failure and return -ENOMEM in such a case.
Signed-off-by: Christophe JAILLET
---
drivers/media/i2c/smiapp/smiapp-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c
b/drivers/media/i2c/smiapp/smiapp-core.c
index
in amdgpu_cs_process_syncobj_out_dep()
---> error code returned by amdgpu_cs_dependencies()
--> amdgpu_cs_parser_fini() is called
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +++
1 file changed, 3 insertions(+)
diff --g
in amdgpu_cs_process_syncobj_out_dep()
---> error code returned by amdgpu_cs_dependencies()
--> amdgpu_cs_parser_fini() is called
Signed-off-by: Christophe JAILLET
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgp
Le 21/08/2017 à 23:41, Jakub Kicinski a écrit :
On Mon, 21 Aug 2017 14:34:30 -0700, Jakub Kicinski wrote:
On Mon, 21 Aug 2017 22:59:56 +0200, Christophe JAILLET wrote:
Check memory allocation failure and return -ENOMEM in such a case, as
already done a few lines below
Signed-off
Le 21/08/2017 à 23:41, Jakub Kicinski a écrit :
On Mon, 21 Aug 2017 14:34:30 -0700, Jakub Kicinski wrote:
On Mon, 21 Aug 2017 22:59:56 +0200, Christophe JAILLET wrote:
Check memory allocation failure and return -ENOMEM in such a case, as
already done a few lines below
Signed-off
Check memory allocation failure and return -ENOMEM in such a case, as
already done a few lines below.
As 'dev->tx_q' can be NULL, we also need to check for that in
'mt7601u_free_tx()', and return early.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
v2: avoid ano
Check memory allocation failure and return -ENOMEM in such a case, as
already done a few lines below.
As 'dev->tx_q' can be NULL, we also need to check for that in
'mt7601u_free_tx()', and return early.
Signed-off-by: Christophe JAILLET
---
v2: avoid another NULL pointer derefere
Check memory allocation failure and return -ENOMEM in such a case, as
already done a few lines below
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/net/wireless/mediatek/mt7601u/dma.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wi
Check memory allocation failure and return -ENOMEM in such a case, as
already done a few lines below
Signed-off-by: Christophe JAILLET
---
drivers/net/wireless/mediatek/mt7601u/dma.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt7601u/dma.c
b/drivers/net
'spi' is known to be NULL, so we dereference a NULL pointer here.
Use 'pr_crit()' instead of 'dev_crit()' to report the message.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/net/ieee802154/ca8210.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
'spi' is known to be NULL, so we dereference a NULL pointer here.
Use 'pr_crit()' instead of 'dev_crit()' to report the message.
Signed-off-by: Christophe JAILLET
---
drivers/net/ieee802154/ca8210.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ieee802154
Return 0 instead of 'ret' (which is 0 at this point) to make the code more
explicit.
Also avoid a useless initialization of 'ret'.
Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr>
---
drivers/soc/fsl/qe/qe_tdm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
801 - 900 of 1619 matches
Mail list logo