[PATCH 4/5] staging: comedi: comedi_pci: dev->board_name is always valid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/comedi_pci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/comedi_pci.c b/drivers/staging/comedi/comedi_pci.c
index 6f3cdf8..5fad084 100644
--- a/drivers/staging/comedi/comedi_pci.c
+++ b/drivers/staging/comedi/comedi_pci.c
@@ -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
-- 
1.8.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux