Dan Carpenter a9f1da09c6 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: 691ead124a0c ("HID: hid-steam: Clean up locking")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Vicki Pfau <vi@endrift.com>
Link: https://lore.kernel.org/r/1fd87904-dabf-4879-bb89-72d13ebfc91e@moroto.mountain
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-01-15 11:54:24 +01:00
..
2023-02-22 11:24:42 -08:00
2024-01-02 11:25:28 +01:00
2023-04-13 16:16:04 +02:00
2023-10-25 18:33:42 +02:00
2022-02-02 15:12:22 +01:00