HID: sony: Fix error handling bug when touchpad registration fails
authorRoderick Colenbrander <roderick.colenbrander@sony.com>
Fri, 9 Dec 2016 03:09:50 +0000 (19:09 -0800)
committerJiri Kosina <jkosina@suse.cz>
Mon, 19 Dec 2016 14:07:37 +0000 (15:07 +0100)
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 <roderick.colenbrander@sony.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c

index 7687c08..f68c921 100644 (file)
@@ -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);