From: Ian Abbott Date: Tue, 9 Dec 2008 11:07:22 +0000 (+0000) Subject: Staging: comedi: Make comedi_auto_config() succeed when auto-configuration disabled. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=719548ef66175bdea228f7b377a4edc259d16ab2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Staging: comedi: Make comedi_auto_config() succeed when auto-configuration disabled. Otherwise it would not work properly. From: Ian Abbott Cc: Frank Mori Hess Cc: David Schleef Signed-off-by: Greg Kroah-Hartman --- 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;