diff --git a/system76_input.c b/system76_input.c index 2a88a46..9ad0d1d 100644 --- a/system76_input.c +++ b/system76_input.c @@ -107,6 +107,8 @@ static void s76_input_screen_wmi(void) { } static int s76_input_open(struct input_dev *dev) { + int res = 0; + // Run polling thread if AP key driver is used and WMI is not supported if ((driver_flags & (DRIVER_AP_KEY | DRIVER_AP_WMI)) == DRIVER_AP_KEY) { s76_input_polling_task = kthread_run( @@ -114,13 +116,14 @@ static int s76_input_open(struct input_dev *dev) { NULL, "system76-polld"); if (unlikely(IS_ERR(s76_input_polling_task))) { + res = PTR_ERR(s76_input_polling_task); s76_input_polling_task = NULL; - S76_ERROR("Could not create polling thread\n"); - return PTR_ERR(s76_input_polling_task); + S76_ERROR("Could not create polling thread: %d\n", res); + return res; } } - return 0; + return res; } static void s76_input_close(struct input_dev *dev) {