staging: comedi: comedi_pci: dev->board_name is always valid

The dev->board_name is always initialized before calling the(*attach)
or (*auto_attach) function. It's no longer necessary to validate the
pointer in comedi_pci_enable().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
H Hartley Sweeten 2013-04-08 10:56:20 -07:00 committed by Greg Kroah-Hartman
parent ae5dd5fcab
commit 46c58127ad
1 changed files with 1 additions and 3 deletions

View File

@ -50,9 +50,7 @@ int comedi_pci_enable(struct comedi_device *dev)
if (rc < 0)
return rc;
rc = pci_request_regions(pcidev, dev->board_name
? dev->board_name
: dev->driver->driver_name);
rc = pci_request_regions(pcidev, dev->board_name);
if (rc < 0)
pci_disable_device(pcidev);
else