mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
635a2b3f3e
commit
942d82646e
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue