diff options
Diffstat (limited to 'drivers/scsi/scsi_proc.c')
-rw-r--r-- | drivers/scsi/scsi_proc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c index ed395154a5b1..3a1c99d5c775 100644 --- a/drivers/scsi/scsi_proc.c +++ b/drivers/scsi/scsi_proc.c | |||
@@ -190,10 +190,14 @@ void scsi_proc_host_rm(struct Scsi_Host *shost) | |||
190 | */ | 190 | */ |
191 | static int proc_print_scsidevice(struct device *dev, void *data) | 191 | static int proc_print_scsidevice(struct device *dev, void *data) |
192 | { | 192 | { |
193 | struct scsi_device *sdev = to_scsi_device(dev); | 193 | struct scsi_device *sdev; |
194 | struct seq_file *s = data; | 194 | struct seq_file *s = data; |
195 | int i; | 195 | int i; |
196 | 196 | ||
197 | if (!scsi_is_sdev_device(dev)) | ||
198 | goto out; | ||
199 | |||
200 | sdev = to_scsi_device(dev); | ||
197 | seq_printf(s, | 201 | seq_printf(s, |
198 | "Host: scsi%d Channel: %02d Id: %02d Lun: %02d\n Vendor: ", | 202 | "Host: scsi%d Channel: %02d Id: %02d Lun: %02d\n Vendor: ", |
199 | sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); | 203 | sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); |
@@ -230,6 +234,7 @@ static int proc_print_scsidevice(struct device *dev, void *data) | |||
230 | else | 234 | else |
231 | seq_printf(s, "\n"); | 235 | seq_printf(s, "\n"); |
232 | 236 | ||
237 | out: | ||
233 | return 0; | 238 | return 0; |
234 | } | 239 | } |
235 | 240 | ||