[PATCH 3/5] staging: comedi: drivers: dev->board_name is always valid

H Hartley Sweeten hsweeten at visionengravers.com
Mon Apr 8 17:56:02 UTC 2013


The dev->board_name is always initialized before calling the(*attach)
or (*auto_attach) function. The "BUG" check in comedi_device_postconfig()
is no longer necessary.

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/comedi/drivers.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index 09d67da..4a1eb7b 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -272,13 +272,8 @@ static int comedi_device_postconfig(struct comedi_device *dev)
 	int ret;
 
 	ret = __comedi_device_postconfig(dev);
-	if (ret < 0) {
+	if (ret < 0)
 		return ret;
-	}
-	if (!dev->board_name) {
-		dev_warn(dev->class_dev, "BUG: dev->board_name=NULL\n");
-		dev->board_name = "BUG";
-	}
 	smp_wmb();
 	dev->attached = true;
 	return 0;
-- 
1.8.1.4




More information about the devel mailing list