From: H Hartley Sweeten Date: Mon, 8 Apr 2013 17:56:02 +0000 (-0700) Subject: staging: comedi: drivers: dev->board_name is always valid X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ae5dd5fcab2d9978e1a0a900a8598b4d92f02657;p=linux-beck.git 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: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 09d67dac74bc..4a1eb7b7a8da 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;