diff options
Diffstat (limited to 'drivers/scsi/device_handler/scsi_dh_hp_sw.c')
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_hp_sw.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c index 12ceab7b3662..ae6be87d6a83 100644 --- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c | |||
@@ -131,11 +131,16 @@ static int hp_sw_bus_notify(struct notifier_block *nb, | |||
131 | unsigned long action, void *data) | 131 | unsigned long action, void *data) |
132 | { | 132 | { |
133 | struct device *dev = data; | 133 | struct device *dev = data; |
134 | struct scsi_device *sdev = to_scsi_device(dev); | 134 | struct scsi_device *sdev; |
135 | struct scsi_dh_data *scsi_dh_data; | 135 | struct scsi_dh_data *scsi_dh_data; |
136 | int i, found = 0; | 136 | int i, found = 0; |
137 | unsigned long flags; | 137 | unsigned long flags; |
138 | 138 | ||
139 | if (!scsi_is_sdev_device(dev)) | ||
140 | return 0; | ||
141 | |||
142 | sdev = to_scsi_device(dev); | ||
143 | |||
139 | if (action == BUS_NOTIFY_ADD_DEVICE) { | 144 | if (action == BUS_NOTIFY_ADD_DEVICE) { |
140 | for (i = 0; hp_sw_dh_data_list[i].vendor; i++) { | 145 | for (i = 0; hp_sw_dh_data_list[i].vendor; i++) { |
141 | if (!strncmp(sdev->vendor, hp_sw_dh_data_list[i].vendor, | 146 | if (!strncmp(sdev->vendor, hp_sw_dh_data_list[i].vendor, |