staging: comedi: cb_pcidda: fix error test in cb_pcidda_attach_pci()

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>
This commit is contained in:
H Hartley Sweeten 2012-10-24 16:28:36 -07:00 committed by Greg Kroah-Hartman
parent 23249ea230
commit ff331f7d90

View file

@ -657,7 +657,7 @@ static int cb_pcidda_attach_pci(struct comedi_device *dev,
int ret; int ret;
thisboard = cb_pcidda_find_boardinfo(dev, pcidev); thisboard = cb_pcidda_find_boardinfo(dev, pcidev);
if (!pcidev) if (!thisboard)
return -ENODEV; return -ENODEV;
dev->board_ptr = thisboard; dev->board_ptr = thisboard;
dev->board_name = thisboard->name; dev->board_name = thisboard->name;