Commit 97d87e00 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: s626: remove unnecessary checks of 'devpriv->base_addr'

'devpriv->base_addr' is valid from this point on in the attach_pci()
function. Remove the unnecessary checks.
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 4f6c7bf9
......@@ -2465,7 +2465,6 @@ static int s626_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
if (!devpriv->base_addr)
return -ENOMEM;
if (devpriv->base_addr) {
/* disable master interrupt */
writel(0, devpriv->base_addr + P_IER);
......@@ -2501,8 +2500,6 @@ static int s626_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
devpriv->allocatedBuf++;
}
ret = comedi_alloc_subdevices(dev, 6);
if (ret)
return ret;
......@@ -2599,7 +2596,7 @@ static int s626_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
/* stop ai_command */
devpriv->ai_cmd_running = 0;
if (devpriv->base_addr && (devpriv->allocatedBuf == 2)) {
if (devpriv->allocatedBuf == 2) {
dma_addr_t pPhysBuf;
uint16_t chan;
......
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