diff options
Diffstat (limited to 'drivers/input/tests/input_test.c')
-rw-r--r-- | drivers/input/tests/input_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/tests/input_test.c b/drivers/input/tests/input_test.c index e5a6c1ad2167..8b8ac3412a70 100644 --- a/drivers/input/tests/input_test.c +++ b/drivers/input/tests/input_test.c @@ -43,8 +43,8 @@ static void input_test_exit(struct kunit *test) { struct input_dev *input_dev = test->priv; - input_unregister_device(input_dev); - input_free_device(input_dev); + if (input_dev) + input_unregister_device(input_dev); } static void input_test_poll(struct input_dev *input) { } |