HID: ACRUX - add missing hid_hw_stop() in ax_probe() error path
authorAxel Lin <axel.lin@gmail.com>
Thu, 14 Jul 2011 05:07:51 +0000 (13:07 +0800)
committerJiri Kosina <jkosina@suse.cz>
Thu, 14 Jul 2011 09:42:53 +0000 (11:42 +0200)
hid_hw_stop() must be called in ax_probe() error path if hid_hw_start()
was successful.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-axff.c

index b4554288de00bee40adb14d3318df8d4aa3c97b8..121514149e0b4fd5f5332b8dee252436b8c784f7 100644 (file)
@@ -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;
        }