aboutsummaryrefslogtreecommitdiff
path: root/drivers/target/target_core_pscsi.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2015-03-30 10:58:32 +0800
committerAlex Shi <alex.shi@linaro.org>2015-03-30 10:58:32 +0800
commit2dad587ec1dddf02a00d3b54156337a6dc79a752 (patch)
tree00c8b9d215663f5b999cf4c7077bb79a05b3c5d0 /drivers/target/target_core_pscsi.c
parent5210951a4876a42856434546d2789838d3e35f34 (diff)
parentbdcec2cf3acd0d9ef24c653b722596f49ef6a040 (diff)
Merge tag 'v3.14.37' into linux-linaro-lsk-v3.14linux-linaro-lsk-v3.14
This is the 3.14.37 stable release
Diffstat (limited to 'drivers/target/target_core_pscsi.c')
-rw-r--r--drivers/target/target_core_pscsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index 0f199f6a0738..29f28808fc03 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -1111,7 +1111,7 @@ static u32 pscsi_get_device_type(struct se_device *dev)
struct pscsi_dev_virt *pdv = PSCSI_DEV(dev);
struct scsi_device *sd = pdv->pdv_sd;
- return sd->type;
+ return (sd) ? sd->type : TYPE_NO_LUN;
}
static sector_t pscsi_get_blocks(struct se_device *dev)