diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-10-01 18:59:13 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-10-23 23:20:51 -0400 |
commit | 942d82646e16725ac366d44087b8c992f2cb2190 (patch) | |
tree | 983f09609d6369d731487940bba21b6682dde27f /drivers/target | |
parent | 635a2b3f3e561278cb5b837ea305e50e3fa7f063 (diff) |
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>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_pscsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index b6d609362d62..3898fb7d317c 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c | |||
@@ -566,7 +566,7 @@ static struct se_device *pscsi_create_virtdevice( | |||
566 | if (IS_ERR(sh)) { | 566 | if (IS_ERR(sh)) { |
567 | pr_err("pSCSI: Unable to locate" | 567 | pr_err("pSCSI: Unable to locate" |
568 | " pdv_host_id: %d\n", pdv->pdv_host_id); | 568 | " pdv_host_id: %d\n", pdv->pdv_host_id); |
569 | return (struct se_device *) sh; | 569 | return ERR_CAST(sh); |
570 | } | 570 | } |
571 | } | 571 | } |
572 | } else { | 572 | } else { |