Skip to content
Commit 17d01f28 authored by Dan Carpenter's avatar Dan Carpenter Committed by Dmitry Torokhov
Browse files

Input: pcf8574_keypad - fix error handling in pcf8574_kp_probe



It is not allowed to call input_free_device() after calling
input_unregister_device() because input devices are refcounted and
unregister will free the device if we were holding he last referenc.

The preferred style in input/ is to make input_register_device() the
last function in the probe which can fail.  That way we don't need to
call input_unregister_device().

Also do not need to call input_set_drvdata() as nothing in the driver
uses the data.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent a4503199
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment