Commit 3af2127d authored by Mike Anderson's avatar Mike Anderson Committed by Linus Torvalds

[PATCH] more edd fixes

I compiled , booted, and checked base attributes for edd/* against the
patch.  I guess I need to get newer hardware one of these days.
parent 3845590d
......@@ -698,10 +698,10 @@ edd_match_scsidev(struct edd_device *edev, struct scsi_device *sd)
static struct scsi_device *
edd_find_matching_scsi_device(struct edd_device *edev)
{
struct list_head *shost_node, *sdev_node;
struct list_head *sdev_node;
int rc = 1;
struct scsi_device *sd = NULL;
struct device *shost_dev, *sdev_dev;
struct device *sdev_dev;
struct pci_dev *pci_dev;
rc = edd_dev_is_type(edev, "SCSI");
......@@ -714,10 +714,6 @@ edd_find_matching_scsi_device(struct edd_device *edev)
get_device(&pci_dev->dev);
list_for_each(shost_node, &pci_dev->dev.children) {
shost_dev = children_to_dev(shost_node);
get_device(shost_dev);
list_for_each(sdev_node, &shost_dev->children) {
sdev_dev = children_to_dev(sdev_node);
get_device(sdev_dev);
......@@ -727,15 +723,9 @@ edd_find_matching_scsi_device(struct edd_device *edev)
if (!rc)
break;
}
put_device(shost_dev);
if (!rc)
break;
}
put_device(&pci_dev->dev);
if (!rc)
return sd;
return NULL;
return rc ? NULL : sd;
}
static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment