OSDN Git Service

HID: hidpp: terminate retry loop on success
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Mon, 5 Jun 2023 16:56:36 +0000 (18:56 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 5 Jun 2023 19:59:58 +0000 (21:59 +0200)
commit7c28afd5512e371773dbb2bf95a31ed5625651d9
treeb4ef51402d67480f18556899f50516216e3051ed
parent6199d23c91ce53bfed455f09a8c5ed170d516824
HID: hidpp: terminate retry loop on success

It seems we forgot the normal case to terminate the retry loop,
making us asking 3 times each command, which is probably a little bit
too much.

And remove the ugly "goto exit" that can be replaced by a simpler "break"

Fixes: 586e8fede795 ("HID: logitech-hidpp: Retry commands when device is busy")
Suggested-by: Mark Lord <mlord@pobox.com>
Tested-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-logitech-hidpp.c