Skip to content
Commit a9f1da09 authored by Dan Carpenter's avatar Dan Carpenter Committed by Benjamin Tissoires
Browse files

HID: hid-steam: Fix cleanup in probe()



There are a number of issues in this code.  First of all if
steam_create_client_hid() fails then it leads to an error pointer
dereference when we call hid_destroy_device(steam->client_hdev).

Also there are a number of leaks.  hid_hw_stop() is not called if
hid_hw_open() fails for example.  And it doesn't call steam_unregister()
or hid_hw_close().

Fixes: 691ead12 ("HID: hid-steam: Clean up locking")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarVicki Pfau <vi@endrift.com>
Link: https://lore.kernel.org/r/1fd87904-dabf-4879-bb89-72d13ebfc91e@moroto.mountain


Signed-off-by: default avatarBenjamin Tissoires <bentiss@kernel.org>
parent a9668169
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment