Re: [PATCH -next] media: vimc: Fix error return code in vimc_register_devices()

2019-10-08 Thread Helen Koike
Hi, On 10/8/19 6:01 AM, Wei Yongjun wrote: > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Fixes: f13d5f361959 ("media: vimc: Collapse component structure into a single > monolithic driver") > Signed-off-by: Wei Yongjun

[PATCH -next] media: vimc: Fix error return code in vimc_register_devices()

2019-10-08 Thread Wei Yongjun
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: f13d5f361959 ("media: vimc: Collapse component structure into a single monolithic driver") Signed-off-by: Wei Yongjun --- drivers/media/platform/vimc/vimc-core.c | 4 +++- 1

[PATCH -next] media: imx: remove unused including

2019-08-28 Thread YueHaibing
Remove including that don't need it. Signed-off-by: YueHaibing --- drivers/staging/media/imx/imx-media-csc-scaler.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-media-csc-scaler.c b/drivers/staging/media/imx/imx-media-csc-scaler.c index de599af59ffc..2b635eb

Re: [PATCH -next] media: si2165: fix platform_no_drv_owner.cocci warnings

2019-03-26 Thread Matthias Schwarzott
Am 21.03.19 um 02:45 schrieb YueHaibing: > Remove .owner field if calls are used which set it automatically > Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci > > Signed-off-by: YueHaibing > --- > drivers/media/dvb-frontends/si2165.c | 1 - > 1 file changed, 1 deletion(-) > > di

[PATCH -next] media: si2165: fix platform_no_drv_owner.cocci warnings

2019-03-20 Thread YueHaibing
Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing --- drivers/media/dvb-frontends/si2165.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/dvb-frontends/si2165.c b/drivers/

[PATCH -next] media: rockchip-vpu: Remove duplicated include from rockchip_vpu_drv.c

2019-02-26 Thread Yue Haibing
From: YueHaibing Remove duplicated include. Signed-off-by: YueHaibing --- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c inde

[PATCH -next] media: rc: remove unused including

2019-02-20 Thread YueHaibing
Remove including that don't need it. Signed-off-by: YueHaibing --- drivers/media/rc/ir-rcmm-decoder.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/rc/ir-rcmm-decoder.c b/drivers/media/rc/ir-rcmm-decoder.c index f1096ac1e5c5..64fb65a9a19f 100644 --- a/drivers/media/rc/ir-rcm

Re: [PATCH -next] media: vimc: remove set but not used variable 'frame_size'

2019-02-16 Thread YueHaibing
On 2019/2/16 17:25, Hans Verkuil wrote: > On 2/16/19 3:24 AM, YueHaibing wrote: >> Fixes gcc '-Wunused-but-set-variable' warning: >> >> drivers/media/platform/vimc/vimc-sensor.c: In function >> 'vimc_sen_process_frame': >> drivers/media/platform/vimc/vimc-sensor.c:208:15: warning: >> variable '

Re: [PATCH -next] media: vimc: remove set but not used variable 'frame_size'

2019-02-16 Thread Hans Verkuil
On 2/16/19 3:24 AM, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/media/platform/vimc/vimc-sensor.c: In function > 'vimc_sen_process_frame': > drivers/media/platform/vimc/vimc-sensor.c:208:15: warning: > variable 'frame_size' set but not used [-Wunused-but-set-va

[PATCH -next] media: vimc: remove set but not used variable 'frame_size'

2019-02-15 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/media/platform/vimc/vimc-sensor.c: In function 'vimc_sen_process_frame': drivers/media/platform/vimc/vimc-sensor.c:208:15: warning: variable 'frame_size' set but not used [-Wunused-but-set-variable] It's never used since introduction. Signe

Re: [PATCH][next] media: staging: intel-ipu3: fix unsigned comparison with < 0

2019-02-04 Thread Sakari Ailus
On Sat, Feb 02, 2019 at 10:12:41PM +, Colin Ian King wrote: > ping? I seem to have applied this to a wrong branch, it'll now be part of my next pull request to Mauro. Thanks! > > On 22/12/2018 11:49, Colin King wrote: > > From: Colin Ian King > > > > The comparison css->pipes[pipe].bindex

Re: [PATCH][next] media: staging: intel-ipu3: fix unsigned comparison with < 0

2019-02-02 Thread Colin Ian King
ping? On 22/12/2018 11:49, Colin King wrote: > From: Colin Ian King > > The comparison css->pipes[pipe].bindex < 0 is always false because > bindex is an unsigned int. Fix this by using a signed integer for > the comparison. > > Detected by CoverityScan, CID#1476023 ("Unsigned compared against

[PATCH -next] media: ov2640: fix initial try format

2019-01-22 Thread Akinobu Mita
Set initial try format with default configuration instead of current one. Fixes: 8d3b307a150a ("media: ov2640: make VIDIOC_SUBDEV_G_FMT ioctl work with V4L2_SUBDEV_FORMAT_TRY") Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov2640.c | 10 +

Re: [PATCH -next] media: staging/intel-ipu3: Fix err handle of ipu3_css_find_binary

2019-01-07 Thread Bingbu Cao
On 01/07/2019 07:00 PM, Sakari Ailus wrote: Hi Bingbu, On Mon, Jan 07, 2019 at 10:38:19AM +0800, Bingbu Cao wrote: Hi, Haibing Thanks for your patch, it looks fine for me. Reviewed-by: Bingbu Cao On 12/29/2018 10:45 AM, YueHaibing wrote: css->pipes[pipe].bindex = binary; I'm taking Colin

Re: [PATCH -next] media: staging/intel-ipu3: Fix err handle of ipu3_css_find_binary

2019-01-07 Thread Sakari Ailus
Hi Bingbu, On Mon, Jan 07, 2019 at 10:38:19AM +0800, Bingbu Cao wrote: > Hi, Haibing > > Thanks for your patch, it looks fine for me. > Reviewed-by: Bingbu Cao > > On 12/29/2018 10:45 AM, YueHaibing wrote: > > css->pipes[pipe].bindex = binary; I'm taking Colin's patch with equivalent content;

Re: [PATCH -next] media: staging/intel-ipu3: Fix err handle of ipu3_css_find_binary

2019-01-06 Thread Bingbu Cao
Hi, Haibing Thanks for your patch, it looks fine for me. Reviewed-by: Bingbu Cao On 12/29/2018 10:45 AM, YueHaibing wrote: css->pipes[pipe].bindex = binary;

RE: [PATCH][next] media: cxd2880-spi: fix two memory leaks of dvb_spi

2019-01-06 Thread Yasunari.Takiguchi
kernel.org > Cc: kernel-janit...@vger.kernel.org; linux-ker...@vger.kernel.org > Subject: [PATCH][next] media: cxd2880-spi: fix two memory leaks of dvb_spi > > From: Colin Ian King > > There are two return paths that do not kfree dvb_spi. Fix the memory > leaks by returning

[PATCH -next] media: staging/intel-ipu3: Fix err handle of ipu3_css_find_binary

2018-12-28 Thread YueHaibing
'bindex' is unsigned, it never less than zero. This patch bring int 'binary' back to handle the err condition. Fixes: 51abe041c5ed ("media: staging/intel-ipu3: Add dual pipe support") Signed-off-by: YueHaibing --- drivers/staging/media/ipu3/ipu3-css.c | 8 1 file changed, 4 insertions(+

[PATCH][next] media: staging: intel-ipu3: fix unsigned comparison with < 0

2018-12-22 Thread Colin King
From: Colin Ian King The comparison css->pipes[pipe].bindex < 0 is always false because bindex is an unsigned int. Fix this by using a signed integer for the comparison. Detected by CoverityScan, CID#1476023 ("Unsigned compared against 0") Fixes: f5f2e4273518 ("media: staging/intel-ipu3: Add c

[PATCH][next] media: cxd2880-spi: fix two memory leaks of dvb_spi

2018-12-22 Thread Colin King
From: Colin Ian King There are two return paths that do not kfree dvb_spi. Fix the memory leaks by returning via the exit label fail_adapter that will free dvi_spi. Detected by CoverityScan, CID#1475991 ("Resource Leak") Fixes: cb496cd472af ("media: cxd2880-spi: Add optional vcc regulator") Sig

[PATCH -next] media: platform: Fix missing spin_lock_init()

2018-12-17 Thread Wei Yongjun
The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Fixes: d2b4387f3bdf ("media: platform: Add Aspeed Video Engine driver") Signed-off-by: Wei Yongjun --- drivers/media/platform/aspeed-vid

[PATCH -next] media: rockchip/vpu: remove set but not used variables 'luma_qtable_p, chroma_qtable_p'

2018-12-08 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c:101:10: warning: variable 'chroma_qtable_p' set but not used [-Wunused-but-set-variable] drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c:100:10: warning: variable 'luma_qtable_p

[PATCH -next] media: seco-cec: add missing header file to fix build

2018-11-30 Thread Randy Dunlap
From: Randy Dunlap Fix build errors due to missing header file. The header file is inserted first because module-related errors begin showing up in (when CONFIG_ACPI is not set). Sample of build errors: In file included from ../include/linux/acpi.h:27:0, from ../drivers/media

Re: [PATCH -next] media: imx-pxp: remove duplicated include from imx-pxp.c

2018-10-08 Thread Philipp Zabel
On Sat, 2018-10-06 at 07:36 +, YueHaibing wrote: > Remove duplicated include. > > Signed-off-by: YueHaibing > --- > drivers/media/platform/imx-pxp.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/media/platform/imx-pxp.c > b/drivers/media/platform/imx-pxp.c > index b76cd0e

[PATCH -next] media: imx-pxp: remove duplicated include from imx-pxp.c

2018-10-06 Thread YueHaibing
Remove duplicated include. Signed-off-by: YueHaibing --- drivers/media/platform/imx-pxp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/platform/imx-pxp.c b/drivers/media/platform/imx-pxp.c index b76cd0e..229c23a 100644 --- a/drivers/media/platform/imx-pxp.c +++ b/drivers/medi

[PATCH -next] [media] media: drop pointless static qualifier in vpfe_ipipeif_init()

2018-10-05 Thread YueHaibing
There is no need to have the 'resource_size_t res_len' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing --- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/davi

[PATCH -next] [media] media: drop pointless static qualifier in vpfe_resizer_init()

2018-10-05 Thread YueHaibing
There is no need to have the 'resource_size_t res_len' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing --- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/davi

[PATCH -next] media: dvb-usb-v2/gl861: Use kmemdup rather than duplicating its implementation in gl861_i2c_write_ex

2018-09-13 Thread YueHaibing
Use kmemdup rather than duplicating its implementation Signed-off-by: YueHaibing --- drivers/media/usb/dvb-usb-v2/gl861.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/gl861.c b/drivers/media/usb/dvb-usb-v2/gl861.c index 0559417..80fed44 1006

[PATCH -next] media: tvp5150: make function tvp5150_volatile_reg() static

2018-08-01 Thread Wei Yongjun
Fixes the following sparse warning: drivers/media/i2c/tvp5150.c:1457:6: warning: symbol 'tvp5150_volatile_reg' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/media/i2c/tvp5150.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c

Re: [PATCH -next] media/platform/cadence: add to fix build error

2018-06-11 Thread Maxime Ripard
On Fri, Jun 08, 2018 at 02:19:06PM -0700, Randy Dunlap wrote: > From: Randy Dunlap > > Add #include to fix build errors. > This driver uses kzalloc() and kfree() so it needs to #include > the appropriate header file for those interfaces. > > Fixes these build errors: > > ../drivers/media/platf

Re: [PATCH][next] media: ispstat: don't dereference user_cfg before a null check

2018-04-30 Thread Gustavo A. R. Silva
Hi Sakari, On 04/30/2018 10:15 AM, Sakari Ailus wrote: Isn't there a guarantee that new_buf won't be NULL ? The new_buf pointer comes from the parg variable in video_usercopy(), which should always point to a valid buffer given that the ioctl number specifies a non-zero size. Fair question. Af

Re: [PATCH][next] media: ispstat: don't dereference user_cfg before a null check

2018-04-30 Thread Sakari Ailus
On Thu, Apr 26, 2018 at 01:03:15PM +0300, Laurent Pinchart wrote: > Hi Sakari, > > On Thursday, 26 April 2018 11:37:31 EEST Sakari Ailus wrote: > > On Tue, Apr 24, 2018 at 02:06:18PM +0100, Colin King wrote: > > > From: Colin Ian King > > > > > > The pointer user_cfg (a copy of new_conf) is dere

Re: [PATCH][next] media: ispstat: don't dereference user_cfg before a null check

2018-04-26 Thread Laurent Pinchart
Hi Sakari, On Thursday, 26 April 2018 11:37:31 EEST Sakari Ailus wrote: > On Tue, Apr 24, 2018 at 02:06:18PM +0100, Colin King wrote: > > From: Colin Ian King > > > > The pointer user_cfg (a copy of new_conf) is dereference before > > new_conf is null checked, hence we may have a null pointer de

Re: [PATCH][next] media: ispstat: don't dereference user_cfg before a null check

2018-04-26 Thread Sakari Ailus
On Tue, Apr 24, 2018 at 02:06:18PM +0100, Colin King wrote: > From: Colin Ian King > > The pointer user_cfg (a copy of new_conf) is dereference before > new_conf is null checked, hence we may have a null pointer dereference > on user_cfg when assigning buf_size from user_cfg->buf_size. Ensure > t

[PATCH][next] media: ispstat: don't dereference user_cfg before a null check

2018-04-24 Thread Colin King
From: Colin Ian King The pointer user_cfg (a copy of new_conf) is dereference before new_conf is null checked, hence we may have a null pointer dereference on user_cfg when assigning buf_size from user_cfg->buf_size. Ensure this does not occur by moving the assignment of buf_size after the null c

Re: [PATCH-next] media: s2255drv: Remove unneeded if else blocks

2018-01-25 Thread walter harms
Am 24.01.2018 22:40, schrieb Christopher Díaz Riveros: > Given the following definitions from s2255drv.c > > #define LINE_SZ_4CIFS_NTSC 640 > #define LINE_SZ_2CIFS_NTSC 640 > #define LINE_SZ_1CIFS_NTSC 320 > > and > > #define LINE_SZ_4CIFS_PAL 704 > #define LINE_SZ_2C

[PATCH-next] media: s2255drv: Remove unneeded if else blocks

2018-01-24 Thread Christopher Díaz Riveros
Given the following definitions from s2255drv.c #define LINE_SZ_4CIFS_NTSC 640 #define LINE_SZ_2CIFS_NTSC 640 #define LINE_SZ_1CIFS_NTSC 320 and #define LINE_SZ_4CIFS_PAL 704 #define LINE_SZ_2CIFS_PAL 704 #define LINE_SZ_1CIFS_PAL 352 f->fmt.pix.width poss

RE: [PATCH -next] media: rcar_drif: fix error return code in rcar_drif_alloc_dmachannels()

2018-01-17 Thread Ramesh Shanmugasundaram
Hi Wei Yongjun, Thank you for the patch. > Subject: [PATCH -next] media: rcar_drif: fix error return code in > rcar_drif_alloc_dmachannels() > > Fix to return error code -ENODEV from the dma_request_slave_channel() > error handling case instead of 0, as done elsewhere in this fun

Re: [PATCH -next] media: rcar_drif: fix error return code in rcar_drif_alloc_dmachannels()

2018-01-17 Thread Geert Uytterhoeven
On Wed, Jan 17, 2018 at 12:24 PM, Wei Yongjun wrote: > Fix to return error code -ENODEV from the dma_request_slave_channel() > error handling case instead of 0, as done elsewhere in this function. > rc can be overwrite to 0 by dmaengine_slave_config() in the for loop. > > Signed-off-by: Wei Yongju

Re: [PATCH -next] media: rcar_drif: fix error return code in rcar_drif_alloc_dmachannels()

2018-01-17 Thread Sergei Shtylyov
Hello! On 01/17/2018 02:24 PM, Wei Yongjun wrote: Fix to return error code -ENODEV from the dma_request_slave_channel() error handling case instead of 0, as done elsewhere in this function. rc can be overwrite to 0 by dmaengine_slave_config() in the for loop. Overwritten. Signed-off-by:

[PATCH -next] media: rcar_drif: fix error return code in rcar_drif_alloc_dmachannels()

2018-01-17 Thread Wei Yongjun
Fix to return error code -ENODEV from the dma_request_slave_channel() error handling case instead of 0, as done elsewhere in this function. rc can be overwrite to 0 by dmaengine_slave_config() in the for loop. Signed-off-by: Wei Yongjun --- drivers/media/platform/rcar_drif.c | 3 ++- 1 file chan

Re: [PATCH -next] media: atmel-isc: Make local symbol fmt_configs_list static

2017-12-25 Thread Yang, Wenyou
On 2017/12/23 9:57, Wei Yongjun wrote: Fixes the following sparse warning: drivers/media/platform/atmel/atmel-isc.c:338:19: warning: symbol 'fmt_configs_list' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- Acked-by: Wenyou Yang drivers/media/platform/atmel/atme

[PATCH -next] media: atmel-isc: Make local symbol fmt_configs_list static

2017-12-22 Thread Wei Yongjun
Fixes the following sparse warning: drivers/media/platform/atmel/atmel-isc.c:338:19: warning: symbol 'fmt_configs_list' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/media/platform/atmel/atmel-isc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH][next] media: lirc: don't kfree the uninitialized pointer txbuf

2017-12-19 Thread Colin King
From: Colin Ian King The current error exit path if ir_raw_encode_scancode fails is via the label out_kfree which kfree's an uninitialized pointer txbuf. Fix this by exiting via a new exit path that does not kfree txbuf. Also exit via this new exit path for a failed allocation of txbuf to avoid

Re: [PATCH -next] media: ov5670: add depends to fix build errors

2017-08-09 Thread Sakari Ailus
On Thu, Jul 20, 2017 at 04:47:38PM -0700, Randy Dunlap wrote: > From: Randy Dunlap > > Fix build errors by adding dependency on VIDEO_V4L2_SUBDEV_API: Thanks for the patch, Randy, but I've already applied Arnd's patch with very similar content. -- Sakari Ailus e-mail: sakari.ai...@iki.fi X

[PATCH -next] media: ov5670: add depends to fix build errors

2017-07-20 Thread Randy Dunlap
From: Randy Dunlap Fix build errors by adding dependency on VIDEO_V4L2_SUBDEV_API: ../drivers/media/i2c/ov5670.c: In function 'ov5670_open': ../drivers/media/i2c/ov5670.c:1917:5: error: implicit declaration of function 'v4l2_subdev_get_try_format' [-Werror=implicit-function-declaration] v4

[PATCH -next] [media] s5p-cec: remove unused including

2017-04-25 Thread Wei Yongjun
From: Wei Yongjun Remove including that is not needed. Signed-off-by: Wei Yongjun --- drivers/media/platform/s5p-cec/s5p_cec.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/platform/s5p-cec/s5p_cec.h b/drivers/media/platform/s5p-cec/s5p_cec.h index 7015845..8bcd8dc 100644

[PATCH -next] [media] rainshadow-cec: Fix missing spin_lock_init()

2017-04-24 Thread Wei Yongjun
From: Wei Yongjun The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Fixes: 0f314f6c2e77 ("[media] rainshadow-cec: new RainShadow Tech HDMI CEC driver") Signed-off-by: Wei Yongjun --- d

[PATCH -next] media/platform/mtk-jpeg: add slab.h to fix build errors

2017-03-06 Thread Randy Dunlap
From: Randy Dunlap Include to fix these build errors: ../drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c: In function 'mtk_jpeg_open': ../drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:1017:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration] ctx = kz

Re: [PATCH -next] [media] mtk-vcodec: remove redundant return value check of platform_get_resource()

2017-02-09 Thread Tiffany Lin
On Tue, 2017-02-07 at 15:16 +, Wei Yongjun wrote: > From: Wei Yongjun > > Remove unneeded error handling on the result of a call > to platform_get_resource() when the value is passed to > devm_ioremap_resource(). > > Signed-off-by: Wei Yongjun Acked-by:Tiffany Lin > --- > drivers/media/p

[PATCH -next] [media] mtk-vcodec: remove redundant return value check of platform_get_resource()

2017-02-07 Thread Wei Yongjun
From: Wei Yongjun Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun --- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 5 - 1 file changed, 5 deletions(-) diff --git a

[PATCH -next] [media] media: usb: tm6000: fix typo in parameter description

2017-01-12 Thread Wei Yongjun
From: Wei Yongjun Fix typo in parameter description. Signed-off-by: Wei Yongjun --- drivers/media/usb/tm6000/tm6000-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-input.c b/drivers/media/usb/tm6000/tm6000-input.c index 7fe00a5..6856

[PATCH -next] [media] atmel-isc: fix error return code in atmel_isc_probe()

2016-11-11 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -ENODEV from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/media/platform/atmel/atmel-isc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/atmel/atmel-isc.c

Re: [PATCH -next] [media] c8sectpfe: fix error return code in c8sectpfe_probe()

2016-11-02 Thread Patrice Chotard
On 10/30/2016 02:53 AM, Wei Yongjun wrote: > From: Wei Yongjun > > Fix to return error code -ENODEV from the error handling > case instead of 0, as done elsewhere in this function. > > Signed-off-by: Wei Yongjun > --- > drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 2 ++ > 1 file c

[PATCH -next] [media] c8sectpfe: fix error return code in c8sectpfe_probe()

2016-10-29 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -ENODEV from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/st

[PATCH -next] [media] dibusb: fix possible memory leak in dibusb_rc_query()

2016-10-29 Thread Wei Yongjun
From: Wei Yongjun 'buf' is malloced in dibusb_rc_query() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff1c123545d7 ("[media] dibusb: handle error code on RC query") Signed-off-by: Wei Yongjun --- drivers/media/usb/dvb-usb/dibusb-

[PATCH -next] [media] dibusb: fix possible memory leak in dibusb_rc_query()

2016-10-29 Thread Wei Yongjun
From: Wei Yongjun 'buf' is malloced in dibusb_rc_query() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff1c123545d7 ("[media] dibusb: handle error code on RC query") Signed-off-by: Wei Yongjun --- drivers/media/usb/dvb-usb/dibusb-

[PATCH -next] [media] s5p-cec: remove unused including

2016-10-29 Thread Wei Yongjun
From: Wei Yongjun Remove including that don't need it. Signed-off-by: Wei Yongjun --- drivers/staging/media/s5p-cec/s5p_cec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c b/drivers/staging/media/s5p-cec/s5p_cec.c index 1780a08..aef962b 100644 ---

Re: [PATCH -next] [media] bdisp: fix error return code in bdisp_probe()

2016-09-22 Thread Fabien DESSENNE
Hi Wei, Thank you for the patch. On 09/21/2016 05:09 PM, Wei Yongjun wrote: > From: Wei Yongjun > > Fix to return error code -EINVAL from the platform_get_resource() error > handling case instead of 0, as done elsewhere in this function. > > Signed-off-by: Wei Yongjun Reviewed-by: Fabien Des

[PATCH -next] [media] cx88: fix error return code in cx8802_dvb_probe()

2016-09-21 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -ENODEV from the error handling case instead of 0(err maybe overwrited to 0 in the for loop), as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/media/pci/cx88/cx88-dvb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/driv

[PATCH -next] [media] bdisp: fix error return code in bdisp_probe()

2016-09-21 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -EINVAL from the platform_get_resource() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/med

[PATCH -next] [media] gs1662: remove .owner field for driver

2016-09-21 Thread Wei Yongjun
From: Wei Yongjun Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun --- drivers/media/spi/gs1662.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/spi/gs1662.c b/driver

[PATCH -next] [media] gs1662: drop kfree for memory allocated with devm_kzalloc

2016-09-21 Thread Wei Yongjun
From: Wei Yongjun It's not necessary to free memory allocated with devm_kzalloc and using kfree leads to a double free. Fixes: 7aae6e2df127 ("[media] Add GS1662 driver, a video serializer") Signed-off-by: Wei Yongjun --- drivers/media/spi/gs1662.c | 3 +-- 1 file changed, 1 insertion(+), 2 del

Re: [PATCH -next] [media] pxa_camera: remove duplicated include from pxa_camera.c

2016-09-20 Thread Robert Jarzmik
Wei Yongjun writes: > From: Wei Yongjun > > Remove duplicated include. > > Signed-off-by: Wei Yongjun Acked-by: Robert Jarzmik Cheers. -- Robert -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo inf

Re: [PATCH -next] [media] pxa_camera: fix error return code in pxa_camera_probe()

2016-09-20 Thread Robert Jarzmik
Wei Yongjun writes: > From: Wei Yongjun > > Fix to return error code -ENODEV from dma_request_slave_channel_compat() > error handling case instead of 0, as done elsewhere in this function. > > Also fix to release resources in v4l2_clk_register() error handling. > > Signed-off-by: Wei Yongjun Ac

[PATCH -next] [media] vivid: fix error return code in vivid_create_instance()

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -ENOMEM from the memory or workqueue alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/media/platform/vivid/vivid-core.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff -

[PATCH -next] [media] pxa_camera: remove duplicated include from pxa_camera.c

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- drivers/media/platform/pxa_camera.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c index 1bce7eb..2d68b80 100644 --- a/drivers/media/platfo

[PATCH -next] [media] pxa_camera: fix error return code in pxa_camera_probe()

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -ENODEV from dma_request_slave_channel_compat() error handling case instead of 0, as done elsewhere in this function. Also fix to release resources in v4l2_clk_register() error handling. Signed-off-by: Wei Yongjun --- drivers/media/platform/pxa_camer

[PATCH -next] [media] adv7511: fix error return code in adv7511_probe()

2016-08-04 Thread Wei Yongjun
Fix to return error code -ENOMEM from the i2c client register error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/media/i2c/adv7511.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/adv7511.c b/drivers/media/i2c/adv75

[PATCH -next] [media] staging: media: lirc: add missing platform_device_del() on error in lirc_parallel_init()

2016-07-19 Thread Wei Yongjun
From: Wei Yongjun Add the missing platform_device_del() before return from lirc_parallel_init() in the error handling case. Signed-off-by: Wei Yongjun --- drivers/staging/media/lirc/lirc_parallel.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/m

Re: [PATCH next] [media] vb2: Fix allocation size of dma_parms

2016-07-19 Thread Marek Szyprowski
Hi On 2016-07-18 19:54, Vincent Stehlé wrote: When allocating memory to hold the device dma parameters in vb2_dma_contig_set_max_seg_size(), the requested size is by mistake only the size of a pointer. Request the correct size instead. Fixes: 3f0339691896 ("media: vb2-dma-contig: add helper fo

[PATCH next] [media] vb2: Fix allocation size of dma_parms

2016-07-18 Thread Vincent Stehlé
When allocating memory to hold the device dma parameters in vb2_dma_contig_set_max_seg_size(), the requested size is by mistake only the size of a pointer. Request the correct size instead. Fixes: 3f0339691896 ("media: vb2-dma-contig: add helper for setting dma max seg size") Signed-off-by: Vince

[PATCH -next] [media] pulse8-cec: fix non static symbol warning

2016-07-13 Thread weiyj_lk
From: Wei Yongjun Fixes the following sparse warning: drivers/staging/media/pulse8-cec/pulse8-cec.c:427:27: warning: symbol 'pulse8_cec_adap_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/staging/media/pulse8-cec/pulse8-cec.c | 2 +- 1 file changed, 1 inse

[PATCH -next] [media] rcar_vin: remove redundant return value check of platform_get_resource()

2016-07-12 Thread weiyj_lk
From: Wei Yongjun Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). And move those two call together to make the connection between them more clear. Signed-off-by: Wei Yongjun --- drivers/media/platform/soc_ca

Re: [PATCH -next] [media] rcar_jpu: Add missing clk_disable_unprepare() on error in jpu_open()

2016-07-12 Thread Mikhail Ulyanov
On Tue, Jul 12, 2016 at 2:21 PM, wrote: > From: Wei Yongjun > > Add the missing clk_disable_unprepare() before return from > jpu_open() in the software reset error handling case. > > Signed-off-by: Wei Yongjun Hello, Wei Yongjun. Thanks for the patch! Acked-by: Mikhail Ulyanov -- W.B.R, M

[PATCH -next] [media] mtk-vcodec: remove .owner field for driver

2016-07-12 Thread weiyj_lk
From: Wei Yongjun Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun --- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers

[PATCH -next] [media] s5p-mfc: remove redundant return value check of platform_get_resource()

2016-07-12 Thread weiyj_lk
From: Wei Yongjun Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/media/

Re: [PATCH -next] [media] mtk-vcodec: remove redundant dev_err call in mtk_vcodec_probe()

2016-07-12 Thread tiffany lin
Reviewed-by: Tiffany Lin On Tue, 2016-07-12 at 11:02 +, weiyj...@163.com wrote: > From: Wei Yongjun > > There is a error message within devm_ioremap_resource > already, so remove the dev_err call to avoid redundant > error message. > > Signed-off-by: Wei Yongjun > --- > drivers/media/pla

[PATCH -next] [media] rcar_jpu: Add missing clk_disable_unprepare() on error in jpu_open()

2016-07-12 Thread weiyj_lk
From: Wei Yongjun Add the missing clk_disable_unprepare() before return from jpu_open() in the software reset error handling case. Signed-off-by: Wei Yongjun --- drivers/media/platform/rcar_jpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/rcar

Re: [PATCH -next] [media] vcodec: mediatek: Fix return value check in mtk_vcodec_init_enc_pm()

2016-07-12 Thread tiffany lin
Reviewed-by:Tiffany Lin On Tue, 2016-07-12 at 11:02 +, weiyj...@163.com wrote: > From: Wei Yongjun > > In case of error, the function devm_clk_get() returns ERR_PTR() > and not returns NULL. The NULL test in the return value check > should be replaced with IS_ERR(). > > Signed-off-by: Wei

[PATCH -next] [media] vcodec: mediatek: Fix return value check in mtk_vcodec_init_enc_pm()

2016-07-12 Thread weiyj_lk
From: Wei Yongjun In case of error, the function devm_clk_get() returns ERR_PTR() and not returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun --- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c | 16 1 file c

[PATCH -next] [media] mtk-vcodec: remove redundant dev_err call in mtk_vcodec_probe()

2016-07-12 Thread weiyj_lk
From: Wei Yongjun There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun --- drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media

[PATCH -next] [media] VPU: mediatek: fix return value check in mtk_vpu_probe()

2016-07-12 Thread weiyj_lk
From: Wei Yongjun In case of error, the function devm_clk_get() returns ERR_PTR() and not returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun --- drivers/media/platform/mtk-vpu/mtk_vpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH -next] [media] VPU: mediatek: remove redundant dev_err call in mtk_vpu_probe()

2016-07-12 Thread weiyj_lk
From: Wei Yongjun There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun --- drivers/media/platform/mtk-vpu/mtk_vpu.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/driv

Re: [PATCH] next: media: cx231xx: add #ifdef to fix compile error

2015-12-22 Thread Okash Khawaja
> On 22 Dec 2015, at 13:08, Javier Martinez Canillas > wrote: > > Hello Okash, > > On 12/22/2015 10:00 AM, Okash Khawaja wrote: > > [snip] > >> >> Cool. There was another similar compile error >> >> https://lkml.org/lkml/2015/12/22/196 > > Yes and you can see in that thread that I also me

Re: [PATCH] next: media: cx231xx: add #ifdef to fix compile error

2015-12-22 Thread Javier Martinez Canillas
Hello Okash, On 12/22/2015 10:00 AM, Okash Khawaja wrote: [snip] > > Cool. There was another similar compile error > > https://lkml.org/lkml/2015/12/22/196 > Yes and you can see in that thread that I also mention that was fixed already :) > Thanks, > Okash > Best regards, -- Javier Marti

Re: [PATCH] next: media: cx231xx: add #ifdef to fix compile error

2015-12-22 Thread Okash Khawaja
On Tue, Dec 22, 2015 at 09:46:19AM -0300, Javier Martinez Canillas wrote: > Hello Okash, > > On 12/22/2015 07:27 AM, Okash Khawaja wrote: > > Compiling linux-next gave this warning: > > > > drivers/media/usb/cx231xx/cx231xx-cards.c: In function > > ‘cx231xx_usb_probe’: > > drivers/media/usb/cx231

Re: [PATCH] next: media: cx231xx: add #ifdef to fix compile error

2015-12-22 Thread Javier Martinez Canillas
Hello Okash, On 12/22/2015 07:27 AM, Okash Khawaja wrote: > Compiling linux-next gave this warning: > > drivers/media/usb/cx231xx/cx231xx-cards.c: In function > ‘cx231xx_usb_probe’: > drivers/media/usb/cx231xx/cx231xx-cards.c:1754:36: error: ‘struct > cx231xx’ has no member named ‘media_dev’ >

[PATCH] next: media: cx231xx: add #ifdef to fix compile error

2015-12-22 Thread Okash Khawaja
Compiling linux-next gave this warning: drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_usb_probe’: drivers/media/usb/cx231xx/cx231xx-cards.c:1754:36: error: ‘struct cx231xx’ has no member named ‘media_dev’ retval = media_device_register(dev->media_dev); Looking at the refactori

[PATCH -next] media/pci/cobalt: fix Kconfig and build when SND is not enabled

2015-06-26 Thread Randy Dunlap
From: Randy Dunlap Fix build errors in cobalt driver when CONFIG_SND is not enabled. Fixes these build errors: ERROR: "snd_pcm_period_elapsed" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "_snd_pcm_stream_lock_irqsave" [drivers/media/pci/cobalt/cobalt.ko] undefined! ERROR: "snd_pcm_hw

[PATCH -next] media/dvb: fix ts2020.c Kconfig and build

2015-06-26 Thread Randy Dunlap
From: Randy Dunlap Fix kconfig warning that is caused by DVB_TS2020: warning: (DVB_TS2020 && SND_SOC_ADAU1761_I2C && SND_SOC_ADAU1781_I2C && SND_SOC_ADAU1977_I2C && SND_SOC_RT5677 && EXTCON_MAX14577 && EXTCON_MAX77693 && EXTCON_MAX77843) selects REGMAP_I2C which has unmet direct dependencies (

Re: [PATCH -next] media: tw68: fix build errors and warnings

2014-10-22 Thread Hans Verkuil
Hi Randy, After analyzing this it became clear that the I2C_ALGOBIT select was bogus since this driver doesn't use i2c at all. I've posted a new patch fixing that. Thanks, Hans On 10/06/2014 07:05 PM, Randy Dunlap wrote: From: Randy Dunlap Fix build errors and kconfig warning: since

[PATCH -next] media: tw68: fix build errors and warnings

2014-10-06 Thread Randy Dunlap
From: Randy Dunlap Fix build errors and kconfig warning: since 'select' does not check Kconfig symbol dependencies, add that dependency explicitly. VIDEO_TW68 selects I2C_ALGOBIT, so it should depend on I2C to prevent build errors and warnings. warning: (CAN_PEAK_PCIEC && SFC && IGB && VIDEO_TW

[PATCH -next] media/radio: fix radio-miropcm20.c build with io.h header file

2014-08-28 Thread Randy Dunlap
From: Randy Dunlap Fix build errors in radio-miropcm20.c due to missing header file: drivers/media/radio/radio-miropcm20.c: In function 'rds_waitread': drivers/media/radio/radio-miropcm20.c:90:3: error: implicit declaration of function 'inb' [-Werror=implicit-function-declaration] drivers/media

[PATCH -next] [media] radio-miropcm20: fix sparse NULL pointer warning

2014-07-29 Thread weiyj_lk
From: Wei Yongjun Fixes the following sparse warnings: drivers/media/radio/radio-miropcm20.c:193:33: warning: Using plain integer as NULL pointer Signed-off-by: Wei Yongjun --- drivers/media/radio/radio-miropcm20.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/m

[PATCH -next] [media] em28xx-audio: remove needless check before usb_free_coherent()

2014-01-14 Thread Wei Yongjun
From: Wei Yongjun usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Wei Yongjun --- drivers/media/usb/em28xx/em28xx-audio.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/med

[PATCH -next] [media] au0828: Fix sparse non static symbol warning

2014-01-14 Thread Wei Yongjun
From: Wei Yongjun Fixes the following sparse warning: drivers/media/usb/au0828/au0828-dvb.c:36:5: warning: symbol 'preallocate_big_buffers' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/media/usb/au0828/au0828-dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH -next] [media] radio-usb-si4713: fix sparse non static symbol warnings

2014-01-14 Thread Wei Yongjun
From: Wei Yongjun Fixes the following sparse warnings: drivers/media/radio/si4713/radio-usb-si4713.c:226:31: warning: symbol 'start_seq' was not declared. Should it be static? drivers/media/radio/si4713/radio-usb-si4713.c:291:29: warning: symbol 'command_table' was not declared. Should it be s

[PATCH -next] [media] radio-bcm2048: fix missing unlock on error in bcm2048_rds_fifo_receive()

2013-12-11 Thread Wei Yongjun
From: Wei Yongjun Add the missing unlock before return from function bcm2048_rds_fifo_receive() in the error handling case. Signed-off-by: Wei Yongjun --- drivers/staging/media/bcm2048/radio-bcm2048.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/bcm2048/radio-bcm20

Re: [PATCH -next] [media] media: i2c: lm3560: fix missing unlock error in lm3560_get_ctrl().

2013-12-03 Thread Sakari Ailus
Hi Daniel, Thanks for the patch. (Dropping LKML; this isn't relevant there.) On Thu, Nov 14, 2013 at 12:43:27PM +0900, Daniel Jeong wrote: > Add the missing unlock before return from function lm3560_get_ctrl() > to avoid deadlock. Thanks to Dan Carpenter. > > Signed-off-by: Daniel Jeong > --- >

  1   2   >