of 'err' which was hiding this issue.
Signed-off-by: Christophe JAILLET
---
drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
b/drivers/staging/media/atomisp
The use of 'fail1' and 'fail2' is not correct. Reorder these calls to
branch at the right place of the error handling path.
Signed-off-by: Christophe JAILLET
---
drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
nup()' does
nothing, but it is more future proof.
Signed-off-by: Christophe JAILLET
---
The change from '&flash->sd.entity' to '&sd->entity' in the last hunk is
done because most of the drivers I've checked do it that way. Not sure if
it is correct. I
initialisation function fails.
The 2nd one reorders own some label are reached in order to have a logical
flow (first error goes to last label, last error goes to first label)
The 3rd one fix the use 'media_entity_cleanup()'. If this one is correct,
some other drivers will need to be fixed th
If 'media_entity_pads_init()' fails, we must free the resources allocated
by 'v4l2_ctrl_handler_init()', as already done in the previous error
handling path.
'goto' the right label to fix it.
Fixes: 9ac0038db9a7 ("media: i2c: Add TDA1997x HDMI receiver driver&
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/medi
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-media@vger.kernel.org added in cc
---
samples/v4l/v4l2-pci-skeleton.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff
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
eeded in the error handling path.
Fixes: 4b4eda001704 ("Staging: media: Unmap and release region obtained by
ioremap_nocache")
Signed-off-by: Christophe JAILLET
---
drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
We should ensure that 'plane_no' is '< vb->num_planes' as done in
'vb2_plane_cookie' just a few lines below.
Cc: sta...@vger.kernel.org
Fixes: e23ccc0ad925 ("[media] v4l: add videobuf2 Video for Linux 2 driver
framework")
Signed-off-by: Chr
Le 24/04/2017 à 22:29, Sakari Ailus a écrit :
Hi Christophe,
On Mon, Apr 24, 2017 at 10:00:24PM +0200, Christophe JAILLET wrote:
Le 24/04/2017 à 16:16, Sakari Ailus a écrit :
On Sun, Apr 23, 2017 at 11:32:57PM +0200, Christophe JAILLET wrote:
We should ensure that 'plane_no'
Le 24/04/2017 à 16:23, Sakari Ailus a écrit :
Hi Christophe,
On Sun, Apr 23, 2017 at 11:40:30PM +0200, Christophe JAILLET wrote:
'call_ptr_memop' can return NULL, so we must test its return value with
'IS_ERR_OR_NULL'. Otherwise, the test 'if (mem_priv)'
Le 24/04/2017 à 16:16, Sakari Ailus a écrit :
On Sun, Apr 23, 2017 at 11:32:57PM +0200, Christophe JAILLET wrote:
We should ensure that 'plane_no' is '< vb->num_planes' as done in
'vb2_plane_cookie' just a few lines below.
Signed-off-by: Christophe JA
We should ensure that 'plane_no' is '< vb->num_planes' as done in
'vb2_plane_cookie' just a few lines below.
Signed-off-by: Christophe JAILLET
---
drivers/media/v4l2-core/videobuf2-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
'call_ptr_memop' can return NULL, so we must test its return value with
'IS_ERR_OR_NULL'. Otherwise, the test 'if (mem_priv)' is meaningless.
Signed-off-by: Christophe JAILLET
---
Note that error checking after 'call_ptr_memop' calls is not consistent
in
Le 24/02/2017 à 22:19, Javier Martinez Canillas a écrit :
Thanks for the patch, but Krzysztof sent the exact same patch before
[0]. There
was feedback from Sylwester at the time that you can also look at [0]. Could you
please take that into account and post a patch according to what he suggested
If 'kzalloc()' fails, we should release resources allocated so far, just as
done in all other cases in this function.
Signed-off-by: Christophe JAILLET
---
Not sure that the error handling path is correct.
Is 'gdev[0]' freed? Should it be?
v2: Rename patch to include
tifier f;
@@
* if (x == NULL)
{
... when != x = e;
(
*f(<+...x...+>);
|
*ret = f(<+...x...+>);
)
...
}
Signed-off-by: Christophe JAILLET
---
drivers/media/usb/tm6000/tm6000-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
According to the surrounding goto, it is likely that 'unprep_clk_gate' was
expected here.
Signed-off-by: Christophe JAILLET
---
drivers/media/platform/s5p-g2d/g2d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/s5p-g2d/g2d.c
b/drivers/medi
If 'kzalloc()' fails, we should release resources allocated so far, just as
done in all other cases in this function.
Signed-off-by: Christophe JAILLET
---
Not sure that the error handling path is correct.
Is 'gdev[0]' freed? Should it be?
---
drivers/staging/media/plat
It is likely that a "of_node_put(ep)" is missing here.
There is one in the previous error handling code, and one a few lines
below in the normal case as well.
Signed-off-by: Christophe JAILLET
---
drivers/media/platform/exynos4-is/media-dev.c | 4 +++-
1 file changed, 3 insert
If 'ov9640_reg_read()' does not return 0, then 'val' is left unmodified.
As it is not initialized either, the return value can be anything.
It is likely that returning the error code was expected here.
Signed-off-by: Christophe JAILLET
---
drivers/media/i2c/soc_camera/ov9
If 'dma_alloc_coherent()' returns NULL, 'vpu_alloc_ext_mem()' will
return 0 which means success.
Return -ENOMEM instead.
Signed-off-by: Christophe JAILLET
---
drivers/media/platform/mtk-vpu/mtk_vpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/driver
It is likely that checking the result of the memory allocation just above
is expected here.
Signed-off-by: Christophe JAILLET
---
drivers/staging/media/s5p-cec/s5p_cec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c
b/drivers
It is likely that checking the result of the 2nd 'read16' is expected here.
Signed-off-by: Christophe JAILLET
---
drivers/media/dvb-frontends/drxk_hard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/dvb-frontends/drxk_hard.c
b/drivers/media/dvb
25 matches
Mail list logo