diff mbox series

scsi: ibmvfc: Fix error return in ibmvfc_probe()

Message ID 20200907083949.154251-1-jingxiangfeng@huawei.com (mailing list archive)
State Accepted
Headers show
Series scsi: ibmvfc: Fix error return in ibmvfc_probe() | expand

Commit Message

Jing Xiangfeng Sept. 7, 2020, 8:39 a.m. UTC
Fix to return error code PTR_ERR() from the error handling case instead
of 0.

Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 drivers/scsi/ibmvscsi/ibmvfc.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Tyrel Datwyler Sept. 9, 2020, 7:20 p.m. UTC | #1
On 9/7/20 1:39 AM, Jing Xiangfeng wrote:
> Fix to return error code PTR_ERR() from the error handling case instead
> of 0.
> 
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>

Acked-by: Tyrel Datwyler <tyreld@linux.ibm.com>

> ---
>  drivers/scsi/ibmvscsi/ibmvfc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
> index ea7c8930592d..70daa0605082 100644
> --- a/drivers/scsi/ibmvscsi/ibmvfc.c
> +++ b/drivers/scsi/ibmvscsi/ibmvfc.c
> @@ -4928,6 +4928,7 @@ static int ibmvfc_probe(struct vio_dev *vdev, const struct vio_device_id *id)
>  	if (IS_ERR(vhost->work_thread)) {
>  		dev_err(dev, "Couldn't create kernel thread: %ld\n",
>  			PTR_ERR(vhost->work_thread));
> +		rc = PTR_ERR(vhost->work_thread);
>  		goto free_host_mem;
>  	}
>  
>
Martin K. Petersen Sept. 10, 2020, 2:11 a.m. UTC | #2
Jing,

> Fix to return error code PTR_ERR() from the error handling case instead
> of 0.

Applied to 5.10/scsi-staging. Thanks!
Martin K. Petersen Sept. 15, 2020, 8:16 p.m. UTC | #3
On Mon, 7 Sep 2020 16:39:49 +0800, Jing Xiangfeng wrote:

> Fix to return error code PTR_ERR() from the error handling case instead
> of 0.

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: ibmvfc: Fix error return in ibmvfc_probe()
      https://git.kernel.org/mkp/scsi/c/5e48a084f4e8
diff mbox series

Patch

diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index ea7c8930592d..70daa0605082 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -4928,6 +4928,7 @@  static int ibmvfc_probe(struct vio_dev *vdev, const struct vio_device_id *id)
 	if (IS_ERR(vhost->work_thread)) {
 		dev_err(dev, "Couldn't create kernel thread: %ld\n",
 			PTR_ERR(vhost->work_thread));
+		rc = PTR_ERR(vhost->work_thread);
 		goto free_host_mem;
 	}