From: Dan Carpenter Date: Thu, 11 Nov 2010 07:59:20 +0000 (-0800) Subject: Input: pcf8574_keypad - fix error handling in pcf8574_kp_probe X-Git-Tag: v2.6.37-rc2~28^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17d01f28e160f8a9c9ecda2e335d0047ec9e7388;p=pandora-kernel.git 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: Dan Carpenter Signed-off-by: Dmitry Torokhov --- Reading git-diff-tree failed