o new mount api")
Reported-by: Hulk Robot
Signed-off-by: Wei Yongjun
---
drivers/android/binderfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
index 7b76fefde3f8..7b4f154f07e6 100644
--- a/drivers/android/binderfs.c
+
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function. Also
removed var 'rv' since we can use 'err' instead.
Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers")
Signed-off-by:
On 2020/5/6 20:57, Dan Carpenter wrote:
> On Wed, May 06, 2020 at 12:52:55PM +0000, Wei Yongjun wrote:
>> Fix to return a negative error code from the error handling
>> case instead of 0, as done elsewhere in this function. Also
>> removed var 'rv' since we can
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function. Also
removed var 'rv' since we can use 'err' instead.
Signed-off-by: Wei Yongjun
---
drivers/staging/kpc2000/kpc2000/core.c | 7 +++
1 file changed
Fix to return negative error code -ENOMEM from cdev alloc failed error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/staging/pi433/pi433_if.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers
Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: df4028658f9d ("staging: Add VirtualBox guest shared folder (vboxsf)
support")
Signed-off-by: Wei Yongjun
---
drivers/staging/vboxsf/super.c | 4 +++-
1 fi
The memory return by kzalloc() has already be set to zero, so remove
useless memset(0).
Signed-off-by: Wei Yongjun
---
drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
Fix to return a negative error code -ENOMEM from the new_inode() and
d_make_root() error handling cases instead of 0, as done elsewhere in
this function.
Fixes: 849d540ddfcd ("binderfs: implement "max" mount option")
Signed-off-by: Wei Yongjun
Reviewed-by: Christian Brauner
Fix to return a negative error code -ENOMEM from the new_inode() and
d_make_root() error handling cases instead of 0, as done elsewhere in
this function.
Fixes: 849d540ddfcd ("binderfs: implement "max" mount option")
Signed-off-by: Wei Yongjun
---
v1 -> v2: move '
Fix to return a negative error code -ENOMEM from the new_inode() and
d_make_root() error handling cases instead of 0, as done elsewhere in
this function.
Fixes: 3ad20fe393b3 ("binder: implement binderfs")
Signed-off-by: Wei Yongjun
---
v1 -> v2: move 'ret = -ENOMEM'
Fix to return a negative error code -ENOMEM from the new_inode() and
d_make_root() error handling cases instead of 0, as done elsewhere in
this function.
Fixes: 3ad20fe393b3 ("binder: implement binderfs")
Signed-off-by: Wei Yongjun
---
drivers/android/binderfs.c | 8 ++--
1 file
Fixes the following sparse warning:
drivers/android/binder.c:3312:1: warning:
symbol 'binder_free_buf' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/android/binder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/android/
In case of error, the function pci_create_slot() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().
Fixes: a15f2c08c708 ("PCI: hv: support reporting serial number as slot
information")
Signed-off-by: Wei Yongjun
---
Sinc
In case of error, the function pci_create_slot() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().
Fixes: a15f2c08c708 ("PCI: hv: support reporting serial number as slot
information")
Signed-off-by: Wei Yongjun
---
d
In case of error, the function device_create() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().
Fixes: 4a965c5f89de ("staging: add driver for Xilinx AXI-Stream FIFO v4.1 IP
core")
Signed-off-by: Wei Yongjun
---
drive
Fix to return a negative error code from the kthread_run() error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/staging/pi433/pi433_if.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging
Fix to return a negative error code from the failover register fail
error handling case instead of 0, as done elsewhere in this function.
Fixes: 1ff78076d8dd ("netvsc: refactor notifier/event handling code to use the
failover framework")
Signed-off-by: Wei Yongjun
---
drivers/
In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().
Fixes: e3cbf478f846 ("staging: mt7621-eth: add the drivers core files")
Signed-off-by: Wei Yongjun
---
drive
In case of error, the function of_phy_connect() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.
Fixes: e3cbf478f846 ("staging: mt7621-eth: add the drivers core files")
Signed-off-by: Wei Yongjun
---
drivers/staging/
In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().
Fixes: f079b6406348 ("staging: mt7621-eth: add gigabit switch driver (GSW)")
Signed-off-by: Wei Yongjun
---
drive
Fixes the following sparse warning:
drivers/staging/mt7621-gpio/gpio-mt7621.c:47:3: warning:
symbol 'gc_map' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
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/staging/ccree/cc_driver.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/ccree/cc_driver.c
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 1
From: Wei Yongjun
Fix to return a negative error code from the es2_arpc_in_enable() error
handling case instead of 0, as done elsewhere in this function.
Fixes: 9d9d3777a9db ("greybus: es2: Add a new bulk in endpoint for
APBridgeA RPC")
Signed-off-by: Wei Yongjun
---
drivers/stagi
Hi Alexander,
On 10/18/2016 11:30 PM, Alexander Alemayhu wrote:
> On Tue, Oct 18, 2016 at 02:37:10PM +0000, Wei Yongjun wrote:
>> From: Wei Yongjun
>>
>> Remove duplicated include.
>>
> How did you discover that? Just curious if you used any tooling.
>
I found
From: Wei Yongjun
Remove including that don't need it.
Signed-off-by: Wei Yongjun
---
drivers/staging/ks7010/ks_wlan.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 5851714..6981170 100644
--- a/drivers/st
From: Wei Yongjun
Use setup_timer function instead of initializing timer with the function
and data fields
Signed-off-by: Wei Yongjun
---
drivers/staging/ks7010/ks_wlan_net.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/ks7010/ks_wlan_net.c
b
From: Wei Yongjun
Remove duplicated include.
Signed-off-by: Wei Yongjun
---
drivers/staging/i4l/pcbit/drv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/i4l/pcbit/drv.c b/drivers/staging/i4l/pcbit/drv.c
index 87b8522..89b0b5b 100644
--- a/drivers/staging/i4l/pcbit/drv.c
From: Wei Yongjun
convert list_for_each() to list_for_each_entry() where
applicable.
Signed-off-by: Wei Yongjun
---
drivers/staging/ks7010/ks_hostif.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/ks7010/ks_hostif.c
b/drivers/staging/ks7010
From: Wei Yongjun
Remove duplicated include.
Signed-off-by: Wei Yongjun
---
drivers/staging/i4l/pcbit/capi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/i4l/pcbit/capi.c b/drivers/staging/i4l/pcbit/capi.c
index 91f2994..a6c4e00 100644
--- a/drivers/staging/i4l/pcbit
From: Wei Yongjun
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.
Fixes: 2eb9d8cbb3c3 ("staging: rts5208: rtsx.c: Alloc sizeof struct")
Signed-off-by: Wei Yongjun
---
drivers/staging/rts5208/rtsx.c | 2 +-
1 file
From: Wei Yongjun
This node pointer is returned by of_find_compatible_node() with
refcount incremented in this function. of_node_put() on it before
exitting this function.
This is detected by Coccinelle semantic patch.
Signed-off-by: Wei Yongjun
---
drivers/staging/greybus/arche-platform.c
From: Wei Yongjun
In case of error, the function kthread_create() 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/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +-
1 file
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/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a
From: Wei Yongjun
In case of error, the function kthread_create() 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/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 6 +++---
1
d-By: Dan Carpenter
Signed-off-by: Wei Yongjun
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
index b2bc09e..68e1e6b 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
@@ -
From: Wei Yongjun
Remove including that don't need it.
Signed-off-by: Wei Yongjun
---
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/staging/media/st-cec/stih-cec.c
index 2143448..b0aee1d 1
From: Wei Yongjun
Fix to return a negative error code from the audio_set_hw_params() error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/staging/most/aim-sound/sound.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
From: Wei Yongjun
image->lock is unlocked in some error handling path without take the
lock, so remove those unexpected unlock.
Fixes: 658bcdae9c67 ("vme: Adding Fake VME driver")
Signed-off-by: Wei Yongjun
---
drivers/vme/bridges/vme_fake.c | 3 ---
1 file changed, 3 deletions(-
From: Wei Yongjun
Remove including that don't need it.
Signed-off-by: Wei Yongjun
---
drivers/staging/ks7010/ks_wlan_net.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/ks7010/ks_wlan_net.c
b/drivers/staging/ks7010/ks_wlan_net.c
index a35325e..c17c45d 100644
From: Wei Yongjun
Fix a double lock bug in SetPSModeWorkItemCallback().
Fixes: 5c2ba8b85e35 ("rtl8712: pwrctrl_priv: Replace semaphore lock
with mutex")
Signed-off-by: Wei Yongjun
---
drivers/staging/rtl8712/rtl871x_pwrctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
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/staging/fsl-mc/bus/fsl-mc-allocator.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging
From: Wei Yongjun
Using list_del_init() instead of list_del() + INIT_LIST_HEAD().
Signed-off-by: Wei Yongjun
---
drivers/staging/fsl-mc/bus/fsl-mc-allocator.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
b/drivers
From: Wei Yongjun
In case of error, the function ion_device_create() 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/staging/android/ion/hisilicon/hi6220_ion.c | 4 ++--
1 file changed
From: Wei Yongjun
Use ATTRIBUTE_GROUPS macro to reduce the number of lines of code.
Generated by Coccinelle semantic patch.
Signed-off-by: Wei Yongjun
---
drivers/staging/fsl-mc/bus/mc-bus.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus
From: Wei Yongjun
Add the missing unlock before return from function
rtw_resume_process() in the error handling case.
Signed-off-by: Wei Yongjun
---
drivers/staging/rtl8188eu/os_dep/usb_intf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu
From: Wei Yongjun
Fixes the following sparse warnings:
drivers/staging/comedi/drivers/dt2811.c:99:20: warning:
symbol 'dt2811_clk_dividers' was not declared. Should it be static?
drivers/staging/comedi/drivers/dt2811.c:103:20: warning:
symbol 'dt2811_clk_multipliers' was
Using list_move_tail() instead of list_del() + list_add_tail().
Signed-off-by: Wei Yongjun
---
drivers/pci/host/pci-hyperv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
index 6955ffdb..a8deeca 100644
--- a
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
From: Wei Yongjun
Fixes the following sparse warnings:
drivers/staging/android/ion/ion_dummy_driver.c:26:19: warning:
symbol 'idev' was not declared. Should it be static?
drivers/staging/android/ion/ion_dummy_driver.c:27:17: warning:
symbol 'heaps' was not declared.
From: Wei Yongjun
Fixes the following sparse warnings:
drivers/staging/silicom/bypasslib/bypass.c:528:12: warning:
symbol 'init_lib_module' was not declared. Should it be static?
drivers/staging/silicom/bypasslib/bypass.c:534:13: warning:
symbol 'cleanup_lib_module' was
From: Wei Yongjun
In case of error, the function crypto_alloc_hash() 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/staging/lustre/lustre/obdclass/capa.c | 4 ++--
1 file changed, 2
From: Wei Yongjun
Add the missing destroy_workqueue() before return from
sep_crypto_setup() and sep_crypto_takedown().
Signed-off-by: Wei Yongjun
---
drivers/staging/sep/sep_crypto.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/sep/sep_crypto.c b/drivers/staging/sep
From: Wei Yongjun
Fixes the following sparse warnings:
drivers/staging/android/ion/tegra/tegra_ion.c:23:19: warning:
symbol 'idev' was not declared. Should it be static?
drivers/staging/android/ion/tegra/tegra_ion.c:24:19: warning:
symbol 'tegra_user_mapper' was not de
From: Wei Yongjun
module_platform_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: Wei Yongjun
---
drivers/staging/android/ion/tegra/tegra_ion.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/staging/android/ion/tegra
From: Wei Yongjun
Fix to return negative error code -EIO from the error handling
case instead of 0.
Signed-off-by: Wei Yongjun
---
drivers/staging/xillybus/xillybus_pcie.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/xillybus/xillybus_pcie.c
b/drivers
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
From: Wei Yongjun
Fixes the following sparse warning:
drivers/staging/dwc2/core.c:2672:6: warning:
symbol 'dwc2_set_param_uframe_sched' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/staging/dwc2/core.c | 2 +-
1 file changed, 1 insertion(+),
From: Wei Yongjun
Fix to return -ENOMEM instead of 0 when the memory alloc fail
in probe error handling path.
Signed-off-by: Wei Yongjun
---
drivers/staging/rts5208/rtsx.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging
From: 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
---
drivers/staging/imx-drm/ipu-v3/ipu-common.c | 2 +-
1 file
From: Wei Yongjun
In case of error, the function platform_device_register_simple() 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/staging/imx-drm/imx-drm-core.c | 4 ++--
1 file changed
From: Wei Yongjun
Add the missing misc_deregister() before return from
sep_register_driver_with_fs() in the error handling case.
Signed-off-by: Wei Yongjun
---
drivers/staging/sep/sep_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/sep/sep_main.c b/drivers/staging
From: Wei Yongjun
Use vfree() instead of kfree() to free vmalloc()
allocated data.
Signed-off-by: Wei Yongjun
---
drivers/staging/crystalhd/crystalhd_lnx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c
b/drivers/staging
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
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
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
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
From: Wei Yongjun
Remove duplicated include.
Signed-off-by: Wei Yongjun
---
drivers/staging/xillybus/xillybus_core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/xillybus/xillybus_core.c
b/drivers/staging/xillybus/xillybus_core.c
index dd0a71c..4b216d4 100644
--- a
From: Wei Yongjun
Remove duplicated include.
Signed-off-by: Wei Yongjun
---
drivers/staging/gdm724x/gdm_lte.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/gdm724x/gdm_lte.c
b/drivers/staging/gdm724x/gdm_lte.c
index 68ebc7d..7165d3a 100644
--- a/drivers/staging/gdm724x
From: Wei Yongjun
Remove duplicated include.
Signed-off-by: Wei Yongjun
---
drivers/staging/comedi/drivers/dt9812.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/dt9812.c
b/drivers/staging/comedi/drivers/dt9812.c
index ffb7572..b865367 100644
--- a/drivers
From: Wei Yongjun
A spin lock is taken here so we should use GFP_ATOMIC.
Signed-off-by: Wei Yongjun
---
drivers/staging/gdm724x/gdm_mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/gdm724x/gdm_mux.c
b/drivers/staging/gdm724x/gdm_mux.c
index f570bc0
71 matches
Mail list logo