--- y/drivers/input/input.c +++ n/drivers/input/input.c @@ -677,12 +677,13 @@ int input_open_device(struct input_handl if (retval) { dev->users--; handle->open--; + mutex_unlock(&dev->mutex); /* * Make sure we are not delivering any more events * through this handle */ synchronize_rcu(); - goto out; + return retval; } }