Skip to content

Commit

Permalink
staging: comedi: comedi_pci: dev->board_name is always valid
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 8, 2013
1 parent ae5dd5f commit 46c5812
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/comedi/comedi_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46c5812

Please sign in to comment.