Skip to content

Commit

Permalink
HID: logitech-hidpp: avoid duplicate error handling code in 'hidpp_pr…
Browse files Browse the repository at this point in the history
…obe()'

'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>
  • Loading branch information
Christophe JAILLET authored and Jiri Kosina committed Jan 13, 2020
1 parent be28136 commit 8f2828d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/hid/hid-logitech-hidpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8f2828d

Please sign in to comment.