Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 942d8264 authored by Dan Carpenter's avatar Dan Carpenter Committed by Nicholas Bellinger
Browse files

target: Make pscsi_create_virtdevice use ERR_CAST



This patch changes pscsi_create_virtdevice() to properly return ERR_CAST
instead of a raw pointer upon scsi_host_lookup() failure.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 635a2b3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -566,7 +566,7 @@ static struct se_device *pscsi_create_virtdevice(
			if (IS_ERR(sh)) {
				pr_err("pSCSI: Unable to locate"
					" pdv_host_id: %d\n", pdv->pdv_host_id);
				return (struct se_device *) sh;
				return ERR_CAST(sh);
			}
		}
	} else {