staging: comedi: cb_pcidda: fix error test in cb_pcidda_attach_pci()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 24 Oct 2012 23:28:36 +0000 (16:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Oct 2012 02:35:37 +0000 (19:35 -0700)
As pointed out by Fengguang Wu, the error test after finding the
boardinfo should be testing for (!thisboard).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/cb_pcidda.c

index 798374fe8da994472169b9a76f009be565205243..06e546f3fdb478310f13064a38602d9d7d28f266 100644 (file)
@@ -657,7 +657,7 @@ static int cb_pcidda_attach_pci(struct comedi_device *dev,
        int ret;
 
        thisboard = cb_pcidda_find_boardinfo(dev, pcidev);
-       if (!pcidev)
+       if (!thisboard)
                return -ENODEV;
        dev->board_ptr = thisboard;
        dev->board_name = thisboard->name;