Browse Source

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 <roderick.colenbrander@sony.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Roderick Colenbrander 8 năm trước cách đây
mục cha
commit
2b6579d4a7
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/hid/hid-sony.c

+ 1 - 1
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);