[PATCH] [media] rc: ttusbir: fix potential double free in ttusbir_probe()

2013-04-09 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Since rc_unregister_device() frees its argument, the subsequently call to rc_free_device() on the same variable will cause a double free bug. Fix by set argument to NULL, thus when fall through to rc_free_device(), nothing will be done

[PATCH] [media] rc: winbond-cir: fix potential double free in wbcir_probe()

2013-04-09 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Since rc_unregister_device() frees its argument, the subsequently call to rc_free_device() on the same variable will cause a double free bug. Fix by set argument to NULL, thus when fall through to rc_free_device(), nothing will be done

[PATCH] [media] rc: ite-cir: fix potential double free in ite_probe()

2013-04-09 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Since rc_unregister_device() frees its argument, the subsequently call to rc_free_device() on the same variable will cause a double free bug. Fix by set argument to NULL, thus when fall through to rc_free_device(), nothing will be done

[PATCH] [media] rc: nuvoton-cir: fix potential double free in nvt_probe()

2013-04-09 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Since rc_unregister_device() frees its argument, the subsequently call to rc_free_device() on the same variable will cause a double free bug. Fix by set argument to NULL, thus when fall through to rc_free_device(), nothing will be done

[PATCH] [media] rc: ene_ir: fix potential double free in ene_probe()

2013-04-09 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Since rc_unregister_device() frees its argument, the subsequently call to rc_free_device() on the same variable will cause a double free bug. Fix by set argument to NULL, thus when fall through to rc_free_device(), nothing will be done

[PATCH -next] [media] s5p-mfc: fix error return code in s5p_mfc_probe()

2013-04-17 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 3 ++- 1 file changed, 2

[PATCH] [media] davinci: vpfe: fix error return code in vpfe_probe()

2013-05-07 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | 6 -- 1 file

[PATCH] [media] v4l: vb2: fix error return code in __vb2_init_fileio()

2013-05-12 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -EINVAL in the get kernel address error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/v4l2-core/videobuf2-core.c | 4 +++- 1 file changed, 3

[PATCH] [media] s5p-tv: fix error return code in mxr_acquire_video()

2013-05-12 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code in the vb2_dma_contig_init_ctx() error handling case instead of 0, as done elsewhere in this function. Also vb2_dma_contig_init_ctx() return ERR_PTR() in case of error and never return NULL, so use IS_ERR

[PATCH] [media] vpif_display: fix error return code in vpif_probe()

2013-05-12 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -ENODEV in the subdevice register error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/davinci/vpif_display.c | 1 + 1 file changed

[PATCH] [media] vpif_capture: fix error return code in vpif_probe()

2013-05-12 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -ENODEV in the subdevice register error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/davinci/vpif_capture.c | 1 + 1 file changed

[PATCH] [media] blackfin: fix error return code in bcap_probe()

2013-05-12 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/blackfin/bfin_capture.c | 2 ++ 1 file changed

[PATCH] [media] sta2x11_vip: fix error return code in sta2x11_vip_init_one()

2013-05-12 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/pci/sta2x11/sta2x11_vip.c | 3 ++- 1 file changed, 2

[PATCH] [media] ad9389b: fix error return code in ad9389b_probe()

2013-05-13 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/i2c/ad9389b.c | 2 ++ 1 file changed, 2 insertions

[PATCH v2] [media] blackfin: fix error return code in bcap_probe()

2013-05-13 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- v1 - v2: move config-num_inputs check to the beginning of this function

Re: [PATCH] [media] sta2x11_vip: fix error return code in sta2x11_vip_init_one()

2013-05-13 Thread Wei Yongjun
of v4l2_device_register() to 'ret' and return it when error. On Monday 13 May 2013 13:59:45 Wei Yongjun wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_

[PATCH v2] [media] sta2x11_vip: fix error return code in sta2x11_vip_init_one()

2013-05-13 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn The orig code will release all the resources if v4l2_device_register() failed and return 0. But what we need in this case is to return an negative error code to let the caller known we are failed. So the patch save the return value

[PATCH -next] [media] coda: fix missing unlock on error in coda_stop_streaming()

2013-06-17 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function coda_stop_streaming() in the error handling case. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/coda.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH -next] [media] coda: fix missing unlock on error in coda_stop_streaming()

2013-06-18 Thread Wei Yongjun
On 06/18/2013 06:03 PM, Philipp Zabel wrote: Am Dienstag, den 18.06.2013, 13:00 +0800 schrieb Wei Yongjun: From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function coda_stop_streaming() in the error handling case. Signed-off-by: Wei Yongjun yongjun_

[PATCH -next v2] [media] davinci: vpif_capture: fix error return code in vpif_probe()

2013-09-02 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -ENODEV in the subdevice register error handling case instead of 0, as done elsewhere in this function. Introduced by commit 873229e4fdf34196aa5d707957c59ba54c25eaba ([media] media: davinci: vpif: capture: add V4L2-async support

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

2013-09-11 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -ENOMEM in the new i2c client and create workqueue error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/i2c/adv7511.c | 2 ++ 1 file changed

[PATCH] [media] v4l: vsp1: fix error return code in vsp1_video_init()

2013-09-11 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/vsp1/vsp1_video.c | 4 +++- 1 file changed, 3

[PATCH] [media] marvell-ccic: drop free_irq for devm_request_irq allocated irq

2013-09-23 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn irq allocated with devm_request_irq should not be freed using free_irq, because doing so causes a dangling pointer, and a subsequent double free. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/marvell-ccic/mmp

[PATCH] [media] saa7164: fix return value check in saa7164_initdev()

2013-10-25 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function kthread_run() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/pci/saa7164

[PATCH -next] [media] v4l: ti-vpe: use module_platform_driver to simplify the code

2013-10-29 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/ti-vpe/vpe.c | 13 + 1 file changed, 1 insertion(+), 12 deletions

[PATCH -next] [media] v4l: ti-vpe: fix error return code in vpe_probe()

2013-10-29 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/ti-vpe/vpe.c | 4 +++- 1 file changed, 3

[PATCH -next] [media] v4l: ti-vpe: fix return value check in vpe_probe()

2013-10-29 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function devm_kzalloc() and devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn

[PATCH -next] [media] media: i2c: lm3560: fix missing unlock on error in lm3560_set_ctrl()

2013-11-07 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function lm3560_set_ctrl() in the error handling case. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/i2c/lm3560.c | 14 +- 1 file changed, 9 insertions(+), 5

[PATCH] [media] cx88: use correct pci drvdata type in cx88_audio_finidev()

2013-11-20 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn We had set the pci drvdata in cx88_audio_initdev() as a type of struct snd_card, so cx88_audio_finidev() should used it as the same type too. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/pci/cx88/cx88-alsa.c | 4

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

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

[PATCH] [media] vpif_capture: fix condition logic in vpif_capture.c

2012-10-30 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn The pattern E == C1 E == C2 is always false. This patch fix this according to the assumption that should be ||. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun yongjun_

[PATCH] [media] vpif_capture: fix condition logic in vpif_capture.c

2012-10-30 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn The pattern E == C1 E == C2 is always false. This patch fix this according to the assumption that should be ||. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun yongjun_

[PATCH] [media] vpif_display: fix condition logic in vpif_enum_dv_timings()

2012-10-30 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn The pattern E == C1 E == C2 is always false. This patch fix this according to the assumption that should be ||. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun yongjun_

Re: [PATCH] [media] vpif_display: fix return value check in vpif_reqbufs()

2012-11-12 Thread Wei Yongjun
Hi Prabhakar, On 11/09/2012 08:33 PM, Prabhakar Lad wrote: Hi Wei, Thanks for the patch. On Wed, Oct 24, 2012 at 4:59 PM, Wei Yongjun weiyj...@gmail.com wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function vb2_dma_contig_init_ctx() returns ERR_PTR

[PATCH v2] [media] vpif_capture: fix return value check

2012-11-15 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function vb2_dma_contig_init_ctx() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). dpatch engine is used to auto generate this patch. (https://github.com

[PATCH -next] [media] mt9v022: fix potential NULL pointer dereference in mt9v022_probe()

2012-11-28 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn The dereference to 'icl' should be moved below the NULL test. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/i2c/soc_camera/mt9v022.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media

[PATCH -next] [media] media: davinci: vpbe: fix return value check in vpbe_display_reqbufs()

2012-12-02 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function vb2_dma_contig_init_ctx() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media

[PATCH -next] [media] s5p-mfc: remove unused variable

2012-12-02 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn The variable index is initialized but never used otherwise, so remove the unused variable. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/s5p-mfc/s5p_mfc.c| 5 - drivers/media/platform/s5p-mfc

[PATCH -next] [media] media: davinci: vpbe: return error code on error in vpbe_display_g_crop()

2012-12-02 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn We have assigned error code to 'ret' if crop-type is not V4L2_BUF_TYPE_VIDEO_OUTPUT, but never use it. We'd better return the error code on this error. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/davinci

[PATCH -next] [media] davinci: vpbe: remove unused variable in vpbe_initialize()

2012-12-02 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn The variable 'output_index' is initialized but never used otherwise, so remove the unused variable. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/davinci/vpbe.c | 2 -- 1 file changed, 2 deletions(-) diff

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

2013-03-20 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/usb/gspca/gspca.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git

[PATCH -next] [media] dvb_usb_v2: make local function dvb_usb_v2_generic_io() static

2013-03-21 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn dvb_usb_v2_generic_io() was not declared. It should be static. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/usb/dvb-usb-v2/dvb_usb_urb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH -next] [media] af9035: fix missing unlock on error in af9035_ctrl_msg()

2013-03-25 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function af9035_ctrl_msg() in the error handling case. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/usb/dvb-usb-v2/af9035.c | 17 + 1 file changed, 9

[PATCH -next] [media] go7007: remove unused including linux/version.h

2013-03-25 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Remove including linux/version.h that don't need it. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/staging/media/go7007/go7007-v4l2.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/go7007/go7007

[PATCH -next] [media] tw9906: remove unused including linux/version.h

2013-03-25 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Remove including linux/version.h that don't need it. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/i2c/tw9906.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/i2c/tw9906.c b/drivers/media/i2c/tw9906.c

[PATCH -next] [media] go7007: fix invalid use of sizeof in go7007_usb_i2c_master_xfer()

2013-03-26 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/staging/media/go7007/go7007-usb.c | 2 +- 1 file changed, 1

Re: [PATCH -next] [media] go7007: fix invalid use of sizeof in go7007_usb_i2c_master_xfer()

2013-03-26 Thread Wei Yongjun
Hi Hans and Dan Carpenter, On 03/26/2013 04:18 PM, Hans Verkuil wrote: On Tue March 26 2013 08:35:57 Dan Carpenter wrote: On Tue, Mar 26, 2013 at 10:04:15AM +0300, Dan Carpenter wrote: On Tue, Mar 26, 2013 at 02:42:47PM +0800, Wei Yongjun wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn

[PATCH -next v2] [media] go7007: fix invalid use of sizeof in go7007_usb_i2c_master_xfer()

2013-03-26 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/staging/media/go7007/go7007-usb.c | 2 +- 1 file changed, 1

[PATCH] [media] s5p-tv: remove unused including linux/version.h

2012-10-08 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Remove including linux/version.h that don't need it. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/s5p-tv/mixer_video.c | 1

[PATCH] cx23885: use list_move_tail instead of list_del/list_add_tail

2012-10-08 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Using list_move_tail() instead of list_del() + list_add_tail(). dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/pci/cx23885/cx23885

[PATCH] cx88: use list_move_tail instead of list_del/list_add_tail

2012-10-08 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Using list_move_tail() instead of list_del() + list_add_tail(). dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/pci/cx88/cx88-mpeg.c

[PATCH] [media] v4l2: use list_move_tail instead of list_del/list_add_tail

2012-10-08 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Using list_move_tail() instead of list_del() + list_add_tail(). dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/fsl-viu.c | 6

[PATCH] dvb-frontends: fix potential NULL pointer dereference in stv0900_set_mclk()

2012-10-08 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn The dereference should be moved below the NULL test. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/dvb-frontends/stv0900_core.c | 6

[PATCH] [media] staging :go700: use module_i2c_driver to simplify the code

2012-10-08 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Use the module_i2c_driver() macro to make the code smaller and a bit simpler. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/staging/media

[PATCH] i2c: vs6624: use module_i2c_driver to simplify the code

2012-10-08 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Use the module_i2c_driver() macro to make the code smaller and a bit simpler. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/i2c

[PATCH] i2c: adv7183: use module_i2c_driver to simplify the code

2012-10-08 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Use the module_i2c_driver() macro to make the code smaller and a bit simpler. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/i2c

[PATCH] [media] mx2_camera: fix missing unlock on error in mx2_start_streaming()

2012-10-21 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock on the error handle path in function mx2_start_streaming(). Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/platform/soc_camera/mx2_camera.c | 8 ++-- 1 file changed, 6 insertions(+), 2

[PATCH] [media] davinci: vpbe: fix missing unlock on error in vpbe_initialize()

2012-10-21 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock on the error handling path in function vpbe_initialize(). Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- no test --- drivers/media/platform/davinci/vpbe.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH] [media] vpif_capture: fix return value check in vpif_reqbufs()

2012-10-24 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function vb2_dma_contig_init_ctx() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). dpatch engine is used to auto generate this patch. (https://github.com

[PATCH] [media] vpif_display: fix return value check in vpif_reqbufs()

2012-10-24 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function vb2_dma_contig_init_ctx() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). dpatch engine is used to auto generate this patch. (https://github.com

[PATCH -next] [media] usbtv: remove unused including linux/version.h

2013-07-16 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Remove including linux/version.h that don't need it. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/media/usb/usbtv/usbtv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/usb/usbtv/usbtv.c b/drivers/media

[PATCH -next] [media] davinci: vpif_display: fix error return code in vpif_probe()

2013-08-22 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -ENODEV in the subdevice register error handling case instead of 0, as done elsewhere in this function. Introduce by commit 4b8a531e6bb0686203e9cf82a54dfe189de7d5c2. ([media] media: davinci: vpif: display: add V4L2-async support

[PATCH -next] [media] davinci: vpif_capture: fix error return code in vpif_probe()

2013-08-22 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -ENODEV in the subdevice register error handling case instead of 0, as done elsewhere in this function. Introduced by commit 873229e4fdf34196aa5d707957c59ba54c25eaba ([media] media: davinci: vpif: capture: add V4L2-async support

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

2014-01-14 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn 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

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

2014-01-14 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn 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 yongjun_...@trendmicro.com.cn --- drivers/media/usb

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

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

[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 <weiyj...@gmail.com> --- drivers/media/i2c/adv7511.c | 1 + 1 file changed, 1 insertion(+) diff --git a/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 <yongjun_...@trendmicro.com.cn> Add the missing platform_device_del() before return from lirc_parallel_init() in the error handling case. Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn> --- drivers/staging/media/lirc/lirc_parallel.c | 10 ++ 1

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

2017-02-07 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- drivers/media/platform/mtk-vcodec/mtk_vcodec_e

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

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <

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

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Remove duplicated include. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- 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_ca

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

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- drivers/media/platform/vivid/vivid-core.c

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

2016-09-21 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- dr

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

2016-09-21 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- drivers/media/spi/gs1662.c | 1 - 1 file changed

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

2016-09-21 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- drivers/media/platform/sti/bdisp/bdisp-v4l2.c |

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

2016-09-21 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- drivers/media/pci/cx88/cx

[PATCH -next] staging: media: stih-cec: remove unused including

2016-09-28 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Remove including that don't need it. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/staging/media/st-cec/stih-cec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/st-cec/stih-cec.c b/drivers/stag

[PATCH -next] dma-buf/sw_sync: fix non static symbol warning

2016-10-29 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: drivers/dma-buf/sw_sync.c:87:22: warning: symbol 'sync_timeline_create' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/dma-buf/sw_sync.c |

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

2016-10-29 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Remove including that don't need it. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- 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/s

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

2016-10-29 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> '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 Y

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

2016-10-29 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> '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 Y

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

2016-10-29 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 2 ++ 1 fil

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

2016-11-11 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- drivers/media/platform/atmel/atmel-isc.c | 1 + 1 file changed, 1 insert

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

2017-01-12 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix typo in parameter description. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/media/usb/tm6000/tm6000-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-input.

[PATCH -next] gp8psk: make local symbol gp8psk_fe_ops static

2017-01-12 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: drivers/media/usb/dvb-usb/gp8psk.c:281:28: warning: symbol 'gp8psk_fe_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/media/usb/dvb-usb/gp8psk

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

2017-04-25 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Remove including that is not needed. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- 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/me

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

2017-04-24 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 driv

[PATCH] [media] vimc: Fix return value check in vimc_add_subdevs()

2017-10-11 Thread Wei Yongjun
In case of error, the function platform_device_register_data() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/media/platform/vimc/vimc-core.c | 5 +++--

[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 <weiyongj...@huawei.com> --- drivers/media/platform/atmel/atmel-isc.c | 2 +- 1 file changed, 1 ins

[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

[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 <weiyongj...@huawei.com> --- drivers/media/pl