Skip to content

Commit

Permalink
staging: comedi: me4000: combine the checks for valid io addresses
Browse files Browse the repository at this point in the history
Combine the sanity checks for valid io addresses into one if().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 8, 2012
1 parent fe531d1 commit 39780a1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/staging/comedi/drivers/me4000.c
Original file line number Diff line number Diff line change
Expand Up @@ -1776,15 +1776,9 @@ static int me4000_attach_pci(struct comedi_device *dev,
return result;

info->plx_regbase = pci_resource_start(pcidev, 1);
if (!info->plx_regbase)
return -ENODEV;

dev->iobase = pci_resource_start(pcidev, 2);
if (!dev->iobase)
return -ENODEV;

info->timer_regbase = pci_resource_start(pcidev, 3);
if (!info->timer_regbase)
if (!info->plx_regbase || !dev->iobase || !info->timer_regbase)
return -ENODEV;

dev->irq = pcidev->irq;
Expand Down

0 comments on commit 39780a1

Please sign in to comment.