[PATCH -next] scsi: hisi_sas: Fix missing unlock on error in hisi_sas_phy_read32()

2018-10-17 Thread Wei Yongjun
Add the missing unlock before return from function hisi_sas_phy_read32() in the error handling case. Fixes: 784b46b7cba0 ("scsi: hisi_sas: Use block layer tag instead for IPTT") Signed-off-by: Wei Yongjun --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 4 +++- 1 file changed, 3 insert

[PATCH -next] scsi: hisi_sas: fix a typo in hisi_sas_task_prep()

2018-05-26 Thread Wei Yongjun
Fix a typo in hisi_sas_task_prep(). Fixes: 7eee4b921822 ("scsi: hisi_sas: relocate smp sg map") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hisi_sas

[PATCH -next] scsi: qedf: Fix error return code in __qedf_probe()

2018-01-17 Thread Wei Yongjun
Fix to return error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/scsi/qedf/qedf_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/qedf/qedf_main.c b/d

[PATCH -next] scsi: hisi_sas: make local symbol host_attrs static

2018-01-11 Thread Wei Yongjun
Fixes the following sparse warning: drivers/scsi/hisi_sas/hisi_sas_main.c:1691:25: warning: symbol 'host_attrs' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion

[PATCH -next] tcmu: fix error return code in tcmu_configure_device()

2018-01-11 Thread Wei Yongjun
Fix to return error code -ENOMEM from the kzalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: fabe6a59cc5a ("tcmu: allow max block and global max blocks to be settable") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/target/ta

[PATCH -next] [SCSI] mac_esp: fix to pass correct device identity to free_irq()

2017-04-24 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- drivers/scsi/mac_esp.c | 2 +- 1 file changed, 1 ins

[PATCH -next] scsi: sd: make sd_devt_release() static

2017-02-08 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fixes the following sparse warning: drivers/scsi/sd.c:3087:6: warning: symbol 'sd_devt_release' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/scsi/sd.c | 2 +- 1 file changed, 1 ins

[PATCH -next] scsi: qedi: Fix possible memory leak in qedi_iscsi_update_conn()

2017-02-07 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 'conn_info' is malloced in qedi_iscsi_update_conn() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.&q

[PATCH -next] scsi: be2iscsi: Use GFP_ATOMIC under spin lock

2017-01-12 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> A spin lock is taken here so we should use GFP_ATOMIC. Fixes: 987132167f4b ("scsi: be2iscsi: Fix for crash in beiscsi_eh_device_reset") Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/scsi/be2iscsi/be_main.c | 2

[PATCH] mvsas: fix error return code in mvs_task_prep()

2016-10-31 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix to return error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/scsi/mvsas/mv_sas.c | 4 +++- 1 file changed, 3 insertions(+)

[PATCH -next] scsi: ufs: fix error return code in ufshcd_init()

2016-09-28 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> 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 <weiyongj...@huawei.com> --- drivers/scsi/ufs/ufshcd.c | 1 + 1 file changed, 1 insertion(+)

[PATCH -next] scsi: ibmvscsis: Fix error return code in ibmvscsis_probe()

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix to return error code -ENOMEM from the dma mapping error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 1 + 1 fil

[PATCH -next] [SCSI] mpt fusion: fix error return code in mptfc_probe()

2016-09-10 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix to return error code -ENOMEM from the workqueue alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/message/fusion/mptfc.c | 4 +++- 1 fil

[PATCH -next] scsi: ibmvfc: fix typo in parameter description

2016-09-08 Thread Wei Yongjun
From: Wei Yongjun <weiyongj...@huawei.com> Fix typo in parameter description. Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/s

[PATCH -next] ipr: Fix error return code in ipr_probe_ioa()

2016-07-29 Thread Wei Yongjun
Fix to return error code -ENOMEM from the workqueue alloc error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/scsi/ipr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c

[PATCH -next] fcoe: add missing destroy_workqueue() on error in fcoe_init()

2016-07-29 Thread Wei Yongjun
Add the missing destroy_workqueue() before return from fcoe_init() in the fcoe transport register failed error handling case. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/scsi/fcoe/fcoe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scs

[PATCH -next] fcoe: Use kfree_skb() instead of kfree()

2016-07-25 Thread Wei Yongjun
Use kfree_skb() instead of kfree() to free sk_buff. Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/scsi/fcoe/fcoe_ctlr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index a569c65..dcf3653

[PATCH -next] ibmvscsis: Use list_move_tail instead of list_del/list_add_tail

2016-07-22 Thread Wei Yongjun
Using list_move_tail() instead of list_del() + list_add_tail(). Signed-off-by: Wei Yongjun <weiyj...@gmail.com> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvsc

[PATCH -next] target/rd: remove unused variable from target_core_rd.c

2014-01-10 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn The variable 'sg_table' is initialized but never used otherwise, so remove the unused variable. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/target/target_core_rd.c | 6 -- 1 file changed, 6 deletions(-) diff --git

[PATCH -next] target/sbc: Fix sparse non static symbol warning

2014-01-10 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fixes the following sparse warning: drivers/target/target_core_sbc.c:573:1: warning: symbol 'sbc_check_prot' was not declared. Should it be static? Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/target/target_core_sbc.c | 2

[PATCH] [SCSI] bfa: fix missing unlock on error in bfad_iocmd_cfg_trunk()

2013-12-19 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function bfad_iocmd_cfg_trunk() in the error handling case. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/scsi/bfa/bfad_bsg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCH] fcoe: add missing destroy_workqueue() on error in fcoe_init()

2013-12-19 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing destroy_workqueue() before return from fcoe_init() in the error handling case. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/scsi/fcoe/fcoe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH] [SCSI] megaraid: use GFP_ATOMIC under spin lock

2013-12-19 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn A spin lock is taken here so we should use GFP_ATOMIC. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/scsi/megaraid/megaraid_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/megaraid

[PATCH] [SCSI] hpsa: fix return value check in start_controller_lockup_detector()

2013-10-29 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/scsi/hpsa.c | 3

[PATCH] target/pscsi: fix return value check

2013-10-25 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function scsi_host_lookup() 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 --- drivers/target

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

2013-08-28 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/target/target_core_xcopy.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/target/target_core_xcopy.c b/drivers

[PATCH -next] [SCSI] ufshcd-pltfrm: remove redundant dev_err call in ufshcd_pltfrm_probe()

2013-07-01 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn 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 yongjun_...@trendmicro.com.cn --- drivers/scsi/ufs/ufshcd-pltfrm.c | 1 - 1 file changed, 1

[PATCH] [SCSI] sd: fix error return code in sd_probe()

2013-05-08 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code in the device add error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/scsi/sd.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH] [SCSI] fnic: fix error return code in fnic_probe()

2013-05-08 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -ENOMEM in the mempool_create_slab_pool() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/scsi/fnic/fnic_main.c | 1 + 1 file changed, 1

[PATCH] [ARM] rpc: acornscsi: fix error return code in acornscsi_probe()

2013-05-07 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -ENOMEM in the ecardm_iomap() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/scsi/arm/acornscsi.c | 4 +++- 1 file changed, 3 insertions

[PATCH -next] [SCSI] scsi_transport_iscsi: fix error return code in iscsi_transport_init()

2013-04-18 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return -ENOMEM in the create workqueue error case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/scsi/scsi_transport_iscsi.c | 4 +++- 1 file changed, 3 insertions

[PATCH -next] [SCSI] qla2xxx: fix error return code in qla2x00_probe_one()

2013-04-18 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn Fix to return a negative error code in the queues alloc error handling case instead of 0, as done elsewhere in this function. And also fix to return 0 from qla2x00_alloc_queues() when no error, otherwise this cause if (!qla2x00_alloc_queues(ha, req

[PATCH] [SCSI] mvumi: fix error return code in mvumi_io_attach()

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/scsi/mvumi.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH -next] [SCSI] mpt fusion: fix error return code in mptfc_probe()

2013-04-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 returned elsewhere in this function. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/message/fusion/mptfc.c | 4 +++- 1 file changed, 3

[PATCH -next] target: fix possible memory leak in core_tpg_register()

2013-03-15 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn 'se_tpg-tpg_lun_list' is malloced in core_tpg_register() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. 'se_tpg' is malloced out of this function, and will be freed if we return error, so

[PATCH -next] [SCSI] csiostor: remove unused variable in csio_process_fwevtq_entry()

2013-03-15 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn The variable 'data' is initialized but never used otherwise, so remove the unused variable. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/scsi/csiostor/csio_hw.c | 5 - 1 file changed, 5 deletions(-) diff --git

[PATCH -next] [SCSI] fnic: convert to use simple_open()

2013-02-25 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/scsi/fnic/fnic_debugfs.c | 19

[PATCH] target: fix return value check in sbp_register_configfs()

2012-09-20 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn In case of error, the function target_fabric_configfs_init() 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

[PATCH] [SCSI] bfa: move the dereference below the NULL test

2012-09-09 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn 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 yongjun_...@trendmicro.com.cn --- drivers/scsi/bfa/bfad_im.c | 8 +--- 1 file

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

2012-09-07 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn 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 yongjun_...@trendmicro.com.cn --- drivers/target/tcm_fc/tfc_io.c | 3 ++- 1 file

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

2012-09-07 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn 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 yongjun_...@trendmicro.com.cn --- drivers/target/target_core_pr.c | 10 ++ 1

[PATCH] [SCSI] bnx2fc: move the dereference below the NULL test

2012-09-07 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn 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 yongjun_...@trendmicro.com.cn --- drivers/scsi/bnx2fc/bnx2fc_io.c | 4 +++- 1 file

[PATCH] [SCSI] bfa: use list_move_tail instead of list_del/list_add_tail

2012-09-05 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn 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 yongjun_...@trendmicro.com.cn --- drivers/scsi/bfa/bfa_ioc.c | 3

[PATCH] [SCSI] lpfc 8.3.32: use list_move_tail instead of list_del/list_add_tail

2012-09-05 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn 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 yongjun_...@trendmicro.com.cn --- drivers/scsi/lpfc/lpfc_sli.c | 3

[PATCH v2] [SCSI] bfa: use list_move_tail instead of list_del/list_add_tail

2012-09-05 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn 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 yongjun_...@trendmicro.com.cn --- v1 - v2: add cleanup for drivers

[PATCH] tcm_fc: remove unused including generated/utsrelease.h

2012-08-25 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn From: Wei Yongjun yongjun_...@trendmicro.com.cn Remove including generated/utsrelease.h that don't need it. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/target/tcm_fc/tfc_cmd.c | 1 - drivers/target/tcm_fc/tfc_io.c | 1

[PATCH] target: remove unused including generated/utsrelease.h

2012-08-25 Thread Wei Yongjun
From: Wei Yongjun yongjun_...@trendmicro.com.cn From: Wei Yongjun yongjun_...@trendmicro.com.cn Remove including generated/utsrelease.h that don't need it. Signed-off-by: Wei Yongjun yongjun_...@trendmicro.com.cn --- drivers/target/target_core_fabric_configfs.c | 1 - drivers/target