diff options
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 049103f1d16f..93d2b6714453 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -359,7 +359,12 @@ static int scsi_bus_match(struct device *dev, struct device_driver *gendrv) | |||
359 | 359 | ||
360 | static int scsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env) | 360 | static int scsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env) |
361 | { | 361 | { |
362 | struct scsi_device *sdev = to_scsi_device(dev); | 362 | struct scsi_device *sdev; |
363 | |||
364 | if (dev->type != &scsi_dev_type) | ||
365 | return 0; | ||
366 | |||
367 | sdev = to_scsi_device(dev); | ||
363 | 368 | ||
364 | add_uevent_var(env, "MODALIAS=" SCSI_DEVICE_MODALIAS_FMT, sdev->type); | 369 | add_uevent_var(env, "MODALIAS=" SCSI_DEVICE_MODALIAS_FMT, sdev->type); |
365 | return 0; | 370 | return 0; |