diff options
Diffstat (limited to 'drivers/scsi/scsi_devinfo.c')
-rw-r--r-- | drivers/scsi/scsi_devinfo.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index a348df895dca..78346b2b69c9 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -269,17 +269,12 @@ static struct { static struct scsi_dev_info_list_table *scsi_devinfo_lookup_by_key(int key) { struct scsi_dev_info_list_table *devinfo_table; - int found = 0; list_for_each_entry(devinfo_table, &scsi_dev_info_list, node) - if (devinfo_table->key == key) { - found = 1; - break; - } - if (!found) - return ERR_PTR(-EINVAL); + if (devinfo_table->key == key) + return devinfo_table; - return devinfo_table; + return ERR_PTR(-EINVAL); } /* @@ -836,7 +831,7 @@ int __init scsi_init_devinfo(void) goto out; for (i = 0; scsi_static_device_list[i].vendor; i++) { - error = scsi_dev_info_list_add(1 /* compatibile */, + error = scsi_dev_info_list_add(1 /* compatible */, scsi_static_device_list[i].vendor, scsi_static_device_list[i].model, NULL, |