Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+24 −27
Original line number Original line Diff line number Diff line
@@ -2465,7 +2465,6 @@ static int s626_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
	if (!devpriv->base_addr)
	if (!devpriv->base_addr)
		return -ENOMEM;
		return -ENOMEM;


	if (devpriv->base_addr) {
	/* disable master interrupt */
	/* disable master interrupt */
	writel(0, devpriv->base_addr + P_IER);
	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++;
	devpriv->allocatedBuf++;


	}

	ret = comedi_alloc_subdevices(dev, 6);
	ret = comedi_alloc_subdevices(dev, 6);
	if (ret)
	if (ret)
		return ret;
		return ret;
@@ -2599,7 +2596,7 @@ static int s626_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
	/* stop ai_command */
	/* stop ai_command */
	devpriv->ai_cmd_running = 0;
	devpriv->ai_cmd_running = 0;


	if (devpriv->base_addr && (devpriv->allocatedBuf == 2)) {
	if (devpriv->allocatedBuf == 2) {
		dma_addr_t pPhysBuf;
		dma_addr_t pPhysBuf;
		uint16_t chan;
		uint16_t chan;