From: Roderick Colenbrander Date: Fri, 9 Dec 2016 03:09:50 +0000 (-0800) Subject: HID: sony: Fix error handling bug when touchpad registration fails X-Git-Tag: v4.10-rc3~32^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2b6579d4a71afb19c6583470783371b992944f67;p=karo-tx-linux.git HID: sony: Fix error handling bug when touchpad registration fails The error handling code in sony_input_configured in general uses goto based cleanup. Recently we migrated code from sony_probe to here, but we didn't update the existing touchpad registration code, which was already here to use the goto. Signed-off-by: Roderick Colenbrander Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 7687c0875395..f68c921af55e 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -2548,7 +2548,7 @@ static int sony_input_configured(struct hid_device *hdev, hid_err(sc->hdev, "Unable to initialize multi-touch slots: %d\n", ret); - return ret; + goto err_stop; } sony_init_output_report(sc, dualshock4_send_output_report);