[PATCH -next] staging: sb105x: fix potential NULL pointer dereference in mp_chars_in_buffer()

2012-11-28 Thread Wei Yongjun
From: Wei Yongjun The dereference to 'state' should be moved below the NULL test. Signed-off-by: Wei Yongjun --- drivers/staging/sb105x/sb_pci_mp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/sb105x/sb_pci_mp.c b/drivers/staging/sb105x/s

[PATCH -next] UBIFS: fix missing unlock on error in ubifs_remount_rw()

2013-03-17 Thread Wei Yongjun
From: Wei Yongjun Add the missing unlock before return from function ubifs_remount_rw() in the error handling case. Signed-off-by: Wei Yongjun --- fs/ubifs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index f21acf0..9791b3c

[PATCH -next] mtip32xx: fix error return code in mtip_pci_probe()

2013-03-20 Thread Wei Yongjun
From: Wei Yongjun 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 --- drivers/block/mtip32xx/mtip32xx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/block

[PATCH -next] Drivers: hv: balloon: make local functions static

2013-03-20 Thread Wei Yongjun
From: Wei Yongjun local functions that could be static. Signed-off-by: Wei Yongjun --- drivers/hv/hv_balloon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 2cf7d4e..d522526 100644 --- a/drivers/hv/hv_balloon.c

[PATCH -next] mxs/spi: fix error return code in mxs_spi_probe()

2013-04-03 Thread Wei Yongjun
From: Wei Yongjun 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 --- drivers/spi/spi-mxs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index

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

2013-04-03 Thread Wei Yongjun
From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- kernel/audit.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/audit.c b/kernel/audit.c index 488f85f..9377913 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -58,7 +58,6 @@ #ifdef CONFIG_SECURITY

[PATCH -next] drbd: fix error return code in drbd_init()

2013-04-03 Thread Wei Yongjun
From: Wei Yongjun 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 --- drivers/block/drbd/drbd_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/block/drbd/drbd_main.c b/drivers

[PATCH -next] virtio_console: make local symbols static

2013-04-05 Thread Wei Yongjun
From: Wei Yongjun Those symbols only used within this file, and should be static. Signed-off-by: Wei Yongjun --- drivers/char/virtio_console.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 13ad9b1

[PATCH -next v2] drbd: fix error return code in drbd_init()

2013-04-05 Thread Wei Yongjun
From: Wei Yongjun 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 --- drivers/block/drbd/drbd_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/block/drbd

[PATCH] PM / devfreq: fix missing unlock on error in exynos4_busfreq_pm_notifier_event()

2013-02-21 Thread Wei Yongjun
From: Wei Yongjun Add the missing unlock before return from function exynos4_busfreq_pm_notifier_event() in the error handling case. This issue introduced by commit 8fa938 (PM / devfreq: exynos4_bus: honor RCU lock usage) Signed-off-by: Wei Yongjun --- drivers/devfreq/exynos4_bus.c | 1 + 1

[PATCH] pinctrl: exynos5440: fix invalid use of sizeof in exynos5440_pinctrl_probe()

2013-03-14 Thread Wei Yongjun
From: Wei Yongjun 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 --- drivers/pinctrl/pinctrl-exynos5440.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl

[PATCH] xtensa: net: fix invalid use of sizeof in iss_net_setup()

2013-03-14 Thread Wei Yongjun
From: Wei Yongjun 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 --- arch/xtensa/platforms/iss/network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/platforms/iss

[PATCH -next] Staging: netlogic: remove unused variable in xlr_net_start_xmit()

2013-03-14 Thread Wei Yongjun
From: Wei Yongjun The variable 'qmap' is initialized but never used otherwise, so remove the unused variable. Signed-off-by: Wei Yongjun --- drivers/staging/netlogic/xlr_net.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/stagin

[PATCH] cciss: fix invalid use of sizeof in cciss_find_cfgtables()

2013-03-14 Thread Wei Yongjun
From: Wei Yongjun 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 --- drivers/block/cciss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/cciss.c b/drivers/block

[PATCH] staging: rtl8192e: remove pointless conditional before kfree_skb()

2012-08-28 Thread Wei Yongjun
From: Wei Yongjun Remove pointless conditional before kfree_skb(). Signed-off-by: Wei Yongjun --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e

[PATCH] staging: ozwpan: remove pointless conditional before kfree_skb()

2012-08-28 Thread Wei Yongjun
From: Wei Yongjun Remove pointless conditional before kfree_skb(). Signed-off-by: Wei Yongjun --- drivers/staging/ozwpan/ozpd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/ozwpan/ozpd.c b/drivers/staging/ozwpan/ozpd.c index 6c287ac..d515714 100644

[PATCH] audit: remove pointless conditional before kfree_skb()

2012-08-28 Thread Wei Yongjun
From: Wei Yongjun Remove pointless conditional before kfree_skb(). Signed-off-by: Wei Yongjun --- kernel/audit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/audit.c b/kernel/audit.c index ea3b7b6..ba9dd4d 100644 --- a/kernel/audit.c +++ b/kernel/audit.c

[PATCH] kdb: fix possible memory leak in kdb_defcmd2()

2012-09-02 Thread Wei Yongjun
From: Wei Yongjun In the error handling case of kdb_defcmd2() s->command has been set to NULL but the save_command remain no free, this will cause memory leak. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- kernel/de

[PATCH] ALSA: fix possible memory leak in snd_mixer_oss_build_input()

2012-09-02 Thread Wei Yongjun
From: Wei Yongjun uinfo has been allocated in this function and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- sound/core/oss/mixer_oss.c | 2 ++ 1 file

[PATCH] mtd: fix possible memory leak in logfs_mtd_can_write_buf()

2012-09-02 Thread Wei Yongjun
From: Wei Yongjun buf has been allocated in this function and should be freed before leaving from the error handling case. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- fs/logfs/dev_mtd.c | 2 +- 1 file changed, 1

[PATCH] Staging: bcm: fix possible memory leak in bcm_char_ioctl()

2012-09-03 Thread Wei Yongjun
From: Wei Yongjun psFwInfo has been allocated in this function and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/staging/bcm/Bcmchar.c | 2 ++ 1

[PATCH] parport: fix possible memory leak in parport_gsc_probe_port()

2012-09-03 Thread Wei Yongjun
From: Wei Yongjun ops has been allocated in this function and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/parport/parport_gsc.c | 1 + 1 file

[PATCH] staging: csr: fix possible memory leak in do_patch_convert_download()

2012-09-03 Thread Wei Yongjun
From: Wei Yongjun pfw has been allocated in function xbv_to_patch() and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/staging/csr

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

2012-09-04 Thread Wei Yongjun
From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). Signed-off-by: Wei Yongjun --- sound/drivers/opl4/opl4_synth.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sound/drivers/opl4/opl4_synth.c b/sound/drivers/opl4/opl4_synth.c index

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

2012-09-04 Thread Wei Yongjun
From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). Signed-off-by: Wei Yongjun --- mm/rmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/rmap.c b/mm/rmap.c index 0f3b7cd..6333654 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -307,8 +307,7

[PATCH] staging: ozwpan: use list_move_tail instead of list_del/list_add_tail

2012-09-04 Thread Wei Yongjun
From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/staging/ozwpan/ozhcd.c | 15 +-- 1 file changed, 5 insertions(+), 10

[PATCH] staging: gdm72xx: use list_move_tail instead of list_del/list_add_tail

2012-09-04 Thread Wei Yongjun
From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/staging/gdm72xx/gdm_usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

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

2012-09-05 Thread Wei Yongjun
From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). Signed-off-by: Wei Yongjun --- sound/pci/emu10k1/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c index 0a43662..1dce0a39

[PATCH] dma: tegra: use list_move_tail instead of list_del/list_add_tail

2012-09-05 Thread Wei Yongjun
From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/dma/tegra20-apb-dma.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

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

2012-09-05 Thread Wei Yongjun
From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/block/drbd/drbd_worker.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PATCH] gpio_msm: using for_each_set_bit to simplify the code

2012-09-13 Thread Wei Yongjun
From: Wei Yongjun Using for_each_set_bit() to simplify the code. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/gpio/gpio-msm-v2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpio/gpio

[PATCH] ARM: at91/gpio: using for_each_set_bit to simplify the code

2012-09-13 Thread Wei Yongjun
From: Wei Yongjun Using for_each_set_bit() to simplify the code. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- arch/arm/mach-at91/gpio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-at91

[PATCH] ARM: mmp: using for_each_set_bit to simplify the code

2012-09-13 Thread Wei Yongjun
From: Wei Yongjun Using for_each_set_bit() to simplify the code. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- arch/arm/mach-mmp/irq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-mmp

[PATCH] gpio: pxa: using for_each_set_bit to simplify the code

2012-09-13 Thread Wei Yongjun
From: Wei Yongjun Using for_each_set_bit() to simplify the code. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/gpio/gpio-pxa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpio/gpio

[PATCH] rtc: avoid calling platform_device_put() twice in test_init()

2012-10-22 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function test_init() need to call platform_device_del() instead of platform_device_unregister(). Otherwise, we may call platform_device_put() twice. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei

[PATCH] pc8736x_gpio: use platform_device_unregister in pc8736x_gpio_cleanup()

2012-10-22 Thread Wei Yongjun
From: Wei Yongjun platform_device_unregister() only calls platform_device_del() and platform_device_put(), thus use platform_device_unregister() to simplify the code. Also the documents in platform.c shows that platform_device_del and platform_device_put must _only_ be externally called in

[PATCH] ARM i.MX: fix error-valued pointer dereference in clk_register_gate2()

2012-10-25 Thread Wei Yongjun
From: Wei Yongjun The error-valued pointer clk is used for the arg of kfree, it should be kfree(gate) if clk_register() return ERR_PTR(). dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- arch/arm/mach-imx/clk-gate2.c | 2

[PATCH -next] CLK: clk-twl6040: fix return value check in twl6040_clk_probe()

2012-10-31 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function clk_register() 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/weiyj/dpatch) Signed-off-by: Wei Yongjun

[PATCH -next] Staging: silicom: bypasslib: remove unused including

2012-10-31 Thread Wei Yongjun
From: Wei Yongjun Remove including that don't need it. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/staging/silicom/bypasslib/bplibk.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/si

[PATCH -next] Staging: silicom: remove unused including

2012-10-31 Thread Wei Yongjun
From: Wei Yongjun Remove including that don't need it. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/staging/silicom/bp_mod.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/silicom/bp_mo

[PATCH] hppfs: fix the return value of get_inode()

2012-09-20 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function get_inode() returns ERR_PTR(). But the users hppfs_lookup() and hppfs_fill_super() use NULL test for check the return value, not IS_ERR(), so we'd better change the return value of get_inode() to NULL instead of ERR_PTR(). dpatch engine is

[PATCH] ufs: fix return value check in ufs_alloc_lastblock()

2012-09-20 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function ufs_get_locked_page() returns ERR_PTR() or NULL pointer. The IS_ERR() test in the error handling should be replaced with IS_ERR_OR_NULL(). dpatch engine is used to auto generated this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei

[PATCH] staging: tidspbridge: fix return value check in dsp_wdt_init()

2012-09-20 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function clk_get() returns ERR_PTR() and never returns NULL pointer. The NULL test in the error handling should be replaced with IS_ERR(). dpatch engine is used to auto generated this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun

[PATCH] davinci: fix return value check by using IS_ERR in tnetv107x_devices_init()

2012-09-20 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function clk_get() returns ERR_PTR() not NULL pointer. The NULL test in the error handling should be replaced with IS_ERR(). dpatch engine is used to auto generated this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- arch/arm

[PATCH] ARM: imx: fix the return value check in imx_clk_busy_divider()

2012-09-20 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function clk_register() returns ERR_PTR() no NULL pointer. The NULL test in the return value check should be replaced with IS_ERR(). dpatch engine is used to auto generated this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun

[PATCH] clk: fix return value check in of_fixed_clk_setup()

2012-09-20 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function clk_register_fixed_rate() returns ERR_PTR() not NULL pointer. The NULL test in the return value check should be replaced with IS_ERR(). dpatch engine is used to auto generated this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei

[PATCH] c2port: fix return value check in duramar2150_c2port_init()

2012-09-21 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function c2port_device_register() returns ERR_PTR() not NULL pointer. The NULL test in the return value check should be replaced with IS_ERR(). dpatch engine is used to auto generated this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei

[PATCH] spi: sh-hspi: fix return value check in hspi_probe()

2012-09-21 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function clk_get() returns ERR_PTR() and never returns NULL pointer. The NULL test in the error handling should be replaced with IS_ERR(). dpatch engine is used to auto generated this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun

[PATCH] ARM: pxa: fix return value check in pxa2xx_drv_pcmcia_probe()

2012-09-21 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function clk_get() returns ERR_PTR() and never returns NULL pointer. The NULL test in the error handling should be replaced with IS_ERR(). dpatch engine is used to auto generated this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun

[PATCH -next] ARM: at91: remove duplicated include from pinctrl-at91.c

2012-10-26 Thread Wei Yongjun
From: Wei Yongjun Remove duplicated include. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/pinctrl/pinctrl-at91.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl

[PATCH -next] ARM: at91: using for_each_set_bit to simplify the code

2012-10-26 Thread Wei Yongjun
From: Wei Yongjun Using for_each_set_bit() to simplify the code. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/pinctrl/pinctrl-at91.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers

[PATCH -next] ARM: at91: remove unused variable in at91_dt_node_to_map()

2012-10-26 Thread Wei Yongjun
From: Wei Yongjun The variable pin is initialized but never used otherwise, so remove the unused variable. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/pinctrl/pinctrl-at91.c | 3 --- 1 file changed, 3 deletions

[PATCH -next] mtip32xx: remove unused variable from mtip32xx.c

2012-10-26 Thread Wei Yongjun
From: Wei Yongjun The variables fis, reply are initialized but never used otherwise, so remove the unused variables. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/block/mtip32xx/mtip32xx.c | 4 1 file changed

[PATCH -next] GPIO: clps711x: use platform_device_unregister in gpio_clps711x_init()

2012-10-26 Thread Wei Yongjun
From: Wei Yongjun platform_device_unregister() only calls platform_device_del() and platform_device_put(), thus use platform_device_unregister() to simplify the code. Also the documents in platform.c shows that platform_device_del and platform_device_put must _only_ be externally called in

[PATCH -next] staging: comedi: use module_comedi_driver to simplify the code

2012-10-26 Thread Wei Yongjun
From: Wei Yongjun Use the module_comedi_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/staging/comedi/drivers/das800.c | 17

[PATCH -next] staging: comedi: skel: use module_comedi_driver to simplify the code

2012-10-26 Thread Wei Yongjun
From: Wei Yongjun Use the module_comedi_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/staging/comedi/drivers/skel.c | 13

[PATCH] vme: vme_ca91cx42.c: fix to pass correct device identity to free_irq()

2013-08-25 Thread Wei Yongjun
From: Wei Yongjun free_irq() expects the same device identity that was passed to corresponding request_irq(), otherwise the IRQ is not freed. Signed-off-by: Wei Yongjun --- drivers/vme/bridges/vme_ca91cx42.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/vme

[PATCH] drm/vmwgfx: fix error return code in vmw_driver_load()

2013-08-26 Thread Wei Yongjun
From: Wei Yongjun Fix to return -ENOMEM in the fence manager init error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH RESEND] PM / AVS: SmartReflex: remove redundant dev_err call in omap_sr_probe()

2013-07-11 Thread 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 Acked-by: Nishanth Menon --- cc to linux-pm with Nishanth Menon's ACK --- drivers/power/avs/smartreflex.c | 4 +--- 1 file changed, 1 inse

[PATCH] VMCI: fix to pass correct device identity to free_irq()

2013-09-05 Thread Wei Yongjun
From: Wei Yongjun free_irq() expects the same device identity that was passed to corresponding request_irq(), otherwise the IRQ is not freed. Signed-off-by: Wei Yongjun --- drivers/misc/vmw_vmci/vmci_guest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc

[PATCH] drm/msm: fix return value check in ERR_PTR()

2013-09-10 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function drm_prime_pages_to_sg() 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 --- drivers/gpu/drm/msm/msm_gem.c | 4 ++-- 1 file changed, 2 insertions

[PATCH] drm/omap: fix error return code in omap_dmm_probe()

2013-09-11 Thread Wei Yongjun
From: Wei Yongjun Fix to return -ENOMEM in the refill memory alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/omapdrm

[PATCH] MFD: ucb1x00-core: fix error return code in ucb1x00_probe()

2013-09-11 Thread Wei Yongjun
From: Wei Yongjun Fix to return a negative error code in the irq alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/mfd/ucb1x00-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd

[PATCH] Drivers: hv: vmbus: fix error return code in vmbus_connect()

2013-09-11 Thread Wei Yongjun
From: Wei Yongjun Fix to return -EINVAL in the version check error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/hv/connection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hv/connection.c b/drivers/hv

[PATCH] drm/msm: fix potential NULL pointer dereference

2013-09-11 Thread Wei Yongjun
From: Wei Yongjun The dereference to 'pdata' should be moved below the NULL test. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/msm/msm_gpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c ind

Re: [PATCH] Drivers: hv: vmbus: fix error return code in vmbus_connect()

2013-09-11 Thread Wei Yongjun
On 09/12/2013 04:03 AM, KY Srinivasan wrote: > >> -Original Message- >> From: Wei Yongjun [mailto:weiyj...@gmail.com] >> Sent: Wednesday, September 11, 2013 4:20 AM >> To: KY Srinivasan; Haiyang Zhang >> Cc: yongjun_...@trendmicro.com.cn; de...@linu

[PATCH] ASoC: wm8993: drop regulator_bulk_free of devm_ allocated data

2013-09-27 Thread Wei Yongjun
From: Wei Yongjun It's not necessary to free regulator consumers allocated with devm_regulator_bulk_get. Signed-off-by: Wei Yongjun --- sound/soc/codecs/wm8993.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index 433d59a..2e

[PATCH] ASoC: wm8993: drop regulator_bulk_free of devm_ allocated data

2013-09-27 Thread Wei Yongjun
From: Wei Yongjun It's not necessary to free regulator consumers allocated with devm_regulator_bulk_get. Signed-off-by: Wei Yongjun --- sound/soc/codecs/wm8993.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index 433d59a..2e

[PATCH -next] drivers: CCI: fix the error handle in cci_pmu_probe()

2013-09-21 Thread Wei Yongjun
From: Wei Yongjun This patch fix the error handle of function cci_pmu_probe(): - using IS_ERR() instead of NULL test for the return value of devm_ioremap_resource() since it nerver return NULL. - remove kfree() for devm_kzalloc allocated memory - remove dev_warn() since devm_ioremap_resource

[PATCH -next] dma: mmp_pdma: use list_move instead of list_del/list_add

2013-09-22 Thread Wei Yongjun
From: Wei Yongjun Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun --- drivers/dma/mmp_pdma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c index ff8d7827..558994f 100644 --- a/drivers/dma

[PATCH] i2o: add missing destroy_workqueue() on error in i2o_driver_register()

2013-09-23 Thread Wei Yongjun
From: Wei Yongjun Add the missing destroy_workqueue() before return from i2o_driver_register() in the error handling case. Signed-off-by: Wei Yongjun --- drivers/message/i2o/driver.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/message/i2o

[PATCH] tps65090-charger: drop devm_free_irq of devm_ allocated irq

2013-09-23 Thread Wei Yongjun
From: Wei Yongjun The devm_request_irq function allocates irq that is released when a driver detaches. Thus, there is no reason to explicitly call devm_free_irq in probe or remove functions. Signed-off-by: Wei Yongjun --- drivers/power/tps65090-charger.c | 11 --- 1 file changed, 4

[PATCH -next] staging: r8188eu: remove needless check before usb_free_urb()

2013-09-23 Thread Wei Yongjun
From: Wei Yongjun usb_free_urb(NULL) is safe and this check is not required. Signed-off-by: Wei Yongjun --- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging

[PATCH] mmc: cb710: drop free_irq for devm_request_irq allocated irq

2013-09-23 Thread Wei Yongjun
From: Wei Yongjun 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 --- drivers/misc/cb710/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] mfd: twl6040: drop devm_free_irq of devm_ allocated irq

2013-09-25 Thread Wei Yongjun
From: Wei Yongjun The devm_request_irq function allocates irq that is released when a driver detaches. Thus, there is no reason to explicitly call devm_free_irq in probe or remove functions. Signed-off-by: Wei Yongjun --- drivers/mfd/twl6040.c | 10 ++ 1 file changed, 2 insertions

[PATCH] mfd: ezx-pcap: drop devm_free_irq of devm_ allocated irq

2013-09-25 Thread Wei Yongjun
From: Wei Yongjun The devm_request_irq function allocates irq that is released when a driver detaches. Thus, there is no reason to explicitly call devm_free_irq in probe or remove functions. Signed-off-by: Wei Yongjun --- drivers/mfd/ezx-pcap.c | 7 +-- 1 file changed, 1 insertion(+), 6

[PATCH] iommu/exynos: use list_del_init instead of list_del/INIT_LIST_HEAD

2012-09-05 Thread Wei Yongjun
From: Wei Yongjun Using list_del_init() instead of list_del() + INIT_LIST_HEAD(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/iommu/exynos-iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH] staging: gdm72xx: use list_move instead of list_del/list_add

2012-09-05 Thread Wei Yongjun
From: Wei Yongjun Using list_move() instead of list_del() + list_add(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/staging/gdm72xx/gdm_usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH] staging: wlags49_h2: use list_move instead of list_del/list_add

2012-09-05 Thread Wei Yongjun
From: Wei Yongjun Using list_move() instead of list_del() + list_add(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/staging/wlags49_h2/wl_netdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH] clockevents: use list_move instead of list_del/list_add

2012-09-05 Thread Wei Yongjun
From: Wei Yongjun Using list_move() instead of list_del() + list_add(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- kernel/time/clockevents.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a

[PATCH] audit: use list_move instead of list_del/list_add in audit-tree

2012-09-05 Thread Wei Yongjun
From: Wei Yongjun Using list_move() instead of list_del() + list_add(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- kernel/audit_tree.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a

[PATCH] JFS: use list_move instead of list_del/list_add

2012-09-06 Thread Wei Yongjun
From: Wei Yongjun Using list_move() instead of list_del() + list_add(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- fs/jfs/jfs_txnmgr.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs

[PATCH] powerpc/powernv: move the dereference below the NULL test

2012-09-06 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- arch/powerpc/platforms/powernv/pci.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

[PATCH] staging: tidspbridge: move the dereference below the NULL test

2012-09-06 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/staging/tidspbridge/core/chnl_sm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH] block: move the dereference below the NULL test

2012-09-07 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/block/swim3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/block

[PATCH] ocfs2: move the dereference below the NULL test

2012-09-09 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- fs/ocfs2/move_extents.c | 3 ++- fs/ocfs2/journal.c | 3 ++- fs/ocfs2/dlmglue.c | 15

[PATCH] irqdomain: move the dereference below the NULL test

2012-09-09 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- kernel/irq/irqdomain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/irq

[PATCH] ARM: davinci: dm644x: move the dereference below the NULL test

2012-09-09 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- arch/arm/mach-davinci/board-dm644x-evm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH] hwspinlock/core: move the dereference below the NULL test

2012-09-09 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/hwspinlock/hwspinlock_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[PATCH] memstick: move the dereference below the NULL test

2012-09-09 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/memstick/host/r592.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH] configfs: move the dereference below the NULL test

2012-09-09 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- fs/configfs/dir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/configfs/dir.c

[PATCH] dgrp: remove unused including

2012-10-07 Thread Wei Yongjun
From: Wei Yongjun Remove including that don't need it. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/staging/dgrp/dgrp_sysfs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/dgrp/dgrp_sy

[PATCH] ARM: sa11x0: remove duplicated include from hackkit.c

2012-10-07 Thread Wei Yongjun
From: Wei Yongjun Remove duplicated include. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- arch/arm/mach-sa1100/hackkit.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-sa1100/hackkit.c b/arch/arm/mach

[PATCH] extcon: remove duplicated include from extcon-gpio.c

2012-10-07 Thread Wei Yongjun
From: Wei Yongjun Remove duplicated include. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/extcon/extcon-gpio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon

[PATCH] drm/nouveau: remove duplicated include from nouveau_drm.c

2012-10-07 Thread Wei Yongjun
From: Wei Yongjun Remove duplicated include. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b

[PATCH] pinctrl: remove duplicated include from pinctrl-bcm2835.c

2012-10-07 Thread Wei Yongjun
From: Wei Yongjun Remove duplicated include. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/pinctrl/pinctrl-bcm2835.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-bcm2835.c b/drivers

[PATCH] staging: csr: remove unused including

2012-10-07 Thread Wei Yongjun
From: Wei Yongjun Remove including that don't need it. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/staging/csr/unifi_wext.h | 1 - drivers/staging/csr/unifi_priv.h | 1 - drivers/stagin

[PATCH] gma500: medfield: fix potential NULL pointer dereference in mdfld_dsi_output_init()

2012-10-07 Thread Wei Yongjun
From: Wei Yongjun 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 --- drivers/gpu/drm/gma500/mdfld_dsi_output.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions

[PATCH] pinctrl: fix return value in bcm2835_pinctrl_probe()

2012-10-07 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function pinctrl_register() returns NULL not ERR_PTR(). The PTR_ERR() in the return value should be replaced with error no. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers

[PATCH] clk: fix return value check in sirfsoc_of_clk_init()

2012-10-07 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function clk_register() 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/weiyj/dpatch) Signed-off-by: Wei Yongjun

  1   2   3   4   5   6   7   8   >