diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 7322eb8e2ba9..e14aef2a197a 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -799,8 +799,10 @@ int comedi_auto_config(struct device *hardware_device, const char *board_name, c int retval; unsigned *private_data = NULL; - if (!comedi_autoconfig) - return -ENODEV; + if (!comedi_autoconfig) { + dev_set_drvdata(hardware_device, NULL); + return 0; + } minor = comedi_alloc_board_minor(hardware_device); if(minor < 0) return minor;