Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317132
b: refs/heads/master
c: 273ba54
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Jun 5, 2012
1 parent 0a5f26b commit c884bb4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 916d7028a91a6a0e4b76e7cfb97819f294cbd803
refs/heads/master: 273ba547da12406d609795bc8976cb2464b15d82
18 changes: 7 additions & 11 deletions trunk/drivers/staging/comedi/drivers/amplc_pc236.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,11 @@ struct pc236_private {
* bus and slot.
*/
#if IS_ENABLED(CONFIG_COMEDI_AMPLC_PC236_PCI)
static int
pc236_find_pci(struct comedi_device *dev, int bus, int slot,
struct pci_dev **pci_dev_p)
struct pci_dev *
pc236_find_pci(struct comedi_device *dev, int bus, int slot)
{
struct pci_dev *pci_dev = NULL;

*pci_dev_p = NULL;

/* Look for matching PCI device. */
for (pci_dev = pci_get_device(PCI_VENDOR_ID_AMPLICON, PCI_ANY_ID, NULL);
pci_dev != NULL;
Expand Down Expand Up @@ -192,8 +189,7 @@ pc236_find_pci(struct comedi_device *dev, int bus, int slot,
}

/* Found a match. */
*pci_dev_p = pci_dev;
return 0;
return pci_dev;
}
/* No match found. */
if (bus || slot) {
Expand All @@ -204,7 +200,7 @@ pc236_find_pci(struct comedi_device *dev, int bus, int slot,
dev_err(dev->class_dev, "error! no %s found!\n",
thisboard->name);
}
return -EIO;
return NULL;
}
#endif

Expand Down Expand Up @@ -499,9 +495,9 @@ static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it)
slot = it->options[1];
share_irq = 1;

ret = pc236_find_pci(dev, bus, slot, &pci_dev);
if (ret < 0)
return ret;
pci_dev = pc236_find_pci(dev, bus, slot);
if (pci_dev == NULL)
return -EIO;
devpriv->pci_dev = pci_dev;
break;
#endif
Expand Down

0 comments on commit c884bb4

Please sign in to comment.