HID: ACRUX - add missing hid_hw_stop() in ax_probe() error path
PATCH 1/1 HID: ACRUX - add missing hid_hw_stop() in ax_probe() error path
hid_hw_stop() must be called in ax_probe() error path if hid_hw_start() was successful.
Signed-off-by Axel Lin <[email protected]>
--- drivers/hid/hid-axff.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/hid/hid-axff.c +1 -0
@@ -154,6 +154,7 @@ static int ax_probe(struct hid_device *hdev, const struct hid_device_id *id) error =hid_hw_open (hdev);if (error) {dev_err (&hdev->dev,"hw open failed\n" ); +hid_hw_stop (hdev);return error; }
Signature · 1 line
1.7.4.1
Quoted 13 lines · Axel Lin
hid_hw_stop()must be called inax_probe()error path ifhid_hw_start()was successful.Signed-off-by Axel Lin <[email protected]>--- drivers/hid/hid-axff.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/hid/hid-axff.c +0
-0
drivers/hid/hid-axff.c static int ax_probe(struct hid_device *hdev, const struct hid_device_id *id) · line 159
Quoted 6 lines
drivers/hid/hid-axff.c +1
-0@@ -154,6 +154,7 @@ static int ax_probe(struct hid_device *hdev, const struct hid_device_id *id) error =hid_hw_open (hdev);if (error) {dev_err (&hdev->dev,"hw open failed\n" ); +hid_hw_stop (hdev);return error; }
Good catch, applied. Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs