mirror of https://gitee.com/openkylin/linux.git
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:
parent
ae5dd5fcab
commit
46c58127ad
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue