Commit ae5dd5fc authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: drivers: dev->board_name is always valid

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 34b68400
...@@ -272,13 +272,8 @@ static int comedi_device_postconfig(struct comedi_device *dev) ...@@ -272,13 +272,8 @@ static int comedi_device_postconfig(struct comedi_device *dev)
int ret; int ret;
ret = __comedi_device_postconfig(dev); ret = __comedi_device_postconfig(dev);
if (ret < 0) { if (ret < 0)
return ret; return ret;
}
if (!dev->board_name) {
dev_warn(dev->class_dev, "BUG: dev->board_name=NULL\n");
dev->board_name = "BUG";
}
smp_wmb(); smp_wmb();
dev->attached = true; dev->attached = true;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment