staging: comedi: drivers: dev->board_name is always valid
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 8 Apr 2013 17:56:02 +0000 (10:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Apr 2013 18:39:19 +0000 (11:39 -0700)
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@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers.c

index 09d67da..4a1eb7b 100644 (file)
@@ -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;