Skip to content
Commit bcfa3be3 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Greg Kroah-Hartman
Browse files

HID: alps: Fix an error handling path in 'alps_input_configured()'

commit 8d2e77b3 upstream.

They are issues:
   - if 'input_allocate_device()' fails and return NULL, there is no need
     to free anything and 'input_free_device()' call is a no-op. It can
     be axed.
   - 'ret' is known to be 0 at this point, so we must set it to a
     meaningful value before returning

Fixes: 2562756d

 ("HID: add Alps I2C HID Touchpad-Stick support")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ad598a48
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment