HID: logitech-hidpp: avoid duplicate error handling code in 'hidpp_probe()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 26 Dec 2019 14:54:35 +0000 (15:54 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 13 Jan 2020 12:26:43 +0000 (13:26 +0100)
'hid_hw_stop()' is already in the error handling path when branching to
the 'hid_hw_open_fail' label.
There is no point in calling it twice, so remove one.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-logitech-hidpp.c

index bb063e7..70e1cb9 100644 (file)
@@ -3817,7 +3817,6 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
        if (ret < 0) {
                dev_err(&hdev->dev, "%s:hid_hw_open returned error:%d\n",
                        __func__, ret);
-               hid_hw_stop(hdev);
                goto hid_hw_open_fail;
        }