diff options
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index b500f0c1449c..8603ae65213d 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -1879,7 +1879,7 @@ int sas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
1879 | struct request *req) | 1879 | struct request *req) |
1880 | { | 1880 | { |
1881 | struct domain_device *dev; | 1881 | struct domain_device *dev; |
1882 | int ret, type = rphy->identify.device_type; | 1882 | int ret, type; |
1883 | struct request *rsp = req->next_rq; | 1883 | struct request *rsp = req->next_rq; |
1884 | 1884 | ||
1885 | if (!rsp) { | 1885 | if (!rsp) { |
@@ -1888,12 +1888,13 @@ int sas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
1888 | return -EINVAL; | 1888 | return -EINVAL; |
1889 | } | 1889 | } |
1890 | 1890 | ||
1891 | /* seems aic94xx doesn't support */ | 1891 | /* no rphy means no smp target support (ie aic94xx host) */ |
1892 | if (!rphy) { | 1892 | if (!rphy) { |
1893 | printk("%s: can we send a smp request to a host?\n", | 1893 | printk("%s: can we send a smp request to a host?\n", |
1894 | __FUNCTION__); | 1894 | __FUNCTION__); |
1895 | return -EINVAL; | 1895 | return -EINVAL; |
1896 | } | 1896 | } |
1897 | type = rphy->identify.device_type; | ||
1897 | 1898 | ||
1898 | if (type != SAS_EDGE_EXPANDER_DEVICE && | 1899 | if (type != SAS_EDGE_EXPANDER_DEVICE && |
1899 | type != SAS_FANOUT_EXPANDER_DEVICE) { | 1900 | type != SAS_FANOUT_EXPANDER_DEVICE) { |