target/pscsi: fix return value check
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 25 Oct 2013 13:53:33 +0000 (21:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jun 2014 19:04:20 +0000 (12:04 -0700)
commit422c451501b6276c8ad4bea5ac6bf85322592d1e
treead23f62ebaf7abc6b0bdee46d1f88d16f2cf5fc6
parent263ee55a37e7fd03646449cbc07e16b7943f0572
target/pscsi: fix return value check

commit 58932e96e438cd78f75e765d7b87ef39d3533d15 upstream.

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_wei@trendmicro.com.cn>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
[bwh: Backported to 3.2: pscsi_configure_device() returns a pointer]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Rui Xiang <rui.xiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/target_core_pscsi.c