Commit 39780a1c authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: me4000: combine the checks for valid io addresses

Combine the sanity checks for valid io addresses into one if().
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fe531d12
......@@ -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;
......
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