diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-09-24 13:22:50 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-26 09:37:30 -0700 |
commit | 41f821d07729d1c3d59d1ebebf4c57e2ffe0a37c (patch) | |
tree | c3244278ad8f193adbb9a52b5a836a52cd0a092a /drivers | |
parent | 7c843aa7731c774a78a31b6dab371024c4756d38 (diff) | |
download | linux-41f821d07729d1c3d59d1ebebf4c57e2ffe0a37c.tar.gz linux-41f821d07729d1c3d59d1ebebf4c57e2ffe0a37c.tar.bz2 linux-41f821d07729d1c3d59d1ebebf4c57e2ffe0a37c.zip |
staging: comedi: s626: remove unneeded local variable in attach_pci()
The 'result' variable is only used to check the return from
comedi_pci_enable(). Just reuse the 'ret' variable.
Also, remove the kernel noise and use the error code from
comedi_pci_enable() instead of returning -ENODEV.
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/s626.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index fb215b24fce8..93e55c314598 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -2445,7 +2445,6 @@ static int s626_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev) /* uint16_t StartVal; */ /* uint16_t index; */ /* unsigned int data[16]; */ - int result; int i; int ret; resource_size_t resourceStart; @@ -2458,11 +2457,9 @@ static int s626_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev) if (alloc_private(dev, sizeof(struct s626_private)) < 0) return -ENOMEM; - result = comedi_pci_enable(pcidev, dev->board_name); - if (result < 0) { - printk(KERN_ERR "s626_attach: comedi_pci_enable fails\n"); - return -ENODEV; - } + ret = comedi_pci_enable(pcidev, dev->board_name); + if (ret) + return ret; devpriv->got_regions = 1; resourceStart = pci_resource_start(pcidev, 0); |