From: H Hartley Sweeten Date: Sat, 8 Sep 2012 00:48:26 +0000 (-0700) Subject: staging: comedi: me4000: combine the checks for valid io addresses X-Git-Tag: firefly_0821_release~3680^2~1977^2~524 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=39780a1caf92342c4deb0d14d39703cf5c70cdac;p=firefly-linux-kernel-4.4.55.git staging: comedi: me4000: combine the checks for valid io addresses Combine the sanity checks for valid io addresses into one if(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index f2c8d040f1f8..219ad6c5a174 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -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;