[PATCH] staging: most: don't access hdm_ch before checking it valid

2020-09-28 Thread Jing Xiangfeng
In try_start_dim_transfer(), pointer hdm_ch is accessed before checking. This may lead to a potential null pointer dereference. Fix this by dereferencing hdm_ch after calling BUG_ON(). Signed-off-by: Jing Xiangfeng --- drivers/staging/most/dim2/dim2.c | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [PATCH] staging: most: don't access hdm_ch before checking it valid

2020-09-28 Thread Jing Xiangfeng
On 2020/9/28 19:48, Dan Carpenter wrote: On Mon, Sep 28, 2020 at 06:48:38PM +0800, Jing Xiangfeng wrote: In try_start_dim_transfer(), pointer hdm_ch is accessed before checking. This may lead to a potential null pointer dereference. Fix this by dereferencing hdm_ch after calling BUG_ON

[PATCH] staging: mfd: hi6421-spmi-pmic: Fix error return in hi6421_spmi_pmic_probe()

2020-09-29 Thread Jing Xiangfeng
Fix to return error code -ENOMEM from the error handling case instead of 0. Signed-off-by: Jing Xiangfeng --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/hikey9xx/hi6421-spmi-pmic.c b/drivers/staging

[PATCH] staging: fieldbus: anybuss: jump to correct label in an error path

2020-10-12 Thread Jing Xiangfeng
In current code, controller_probe() misses to call ida_simple_remove() in an error path. Jump to correct label to fix it. Fixes: 17614978ed34 ("staging: fieldbus: anybus-s: support the Arcx anybus controller") Signed-off-by: Jing Xiangfeng --- drivers/staging/fieldbus/anybuss/arcx-an

[PATCH] staging: gasket: interrupt: fix the missed eventfd_ctx_put() in gasket_interrupt.c

2020-11-11 Thread Jing Xiangfeng
aging: Gasket driver framework + Apex driver") Signed-off-by: Jing Xiangfeng --- drivers/staging/gasket/gasket_interrupt.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/staging/gasket/gasket_interrupt.c b/drivers/staging/gasket/gasket_interru

[PATCH] staging: olpc_dcon: Do not call platform_device_unregister() in dcon_probe()

2020-11-19 Thread Jing Xiangfeng
In dcon_probe(), when platform_device_add() failes to add the device, it jumps to call platform_device_unregister() to remove the device, which is unnecessary. So use platform_device_put() instead. Fixes: 53c43c5ca133 ("Revert "Staging: olpc_dcon: Remove obsolete driver"")