Thread (2 messages) 2 messages, 2 authors, 2022-11-15

[PATCH] HID: playstation: remove unreachable code

flat view
STALE1434d

From: Jiapeng Chong <hidden>
Date: 2022-11-15 05:39:56
Also in: lkml
Subsystem: hid core layer, hid playstation driver, the rest · Maintainers: Jiri Kosina, Benjamin Tissoires, Roderick Colenbrander, Linus Torvalds

The function dualshock4_get_calibration_data cannot execute hid_err,
delete the invalid code.

drivers/hid/hid-playstation.c:1766 dualshock4_get_calibration_data() warn: ignoring unreachable code.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3073
Reported-by: Abaci Robot <redacted>
Signed-off-by: Jiapeng Chong <redacted>
---
 drivers/hid/hid-playstation.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/drivers/hid/hid-playstation.c b/drivers/hid/hid-playstation.c
index bae3e712a562..a4106f760d1f 100644
--- a/drivers/hid/hid-playstation.c
+++ b/drivers/hid/hid-playstation.c
@@ -1763,8 +1763,6 @@ static int dualshock4_get_calibration_data(struct dualshock4 *ds4)
 					ret = -EILSEQ;
 					goto err_free;
 				}
-				hid_err(hdev, "Failed to retrieve DualShock4 calibration info: %d\n", ret);
-				goto err_free;
 			} else {
 				break;
 			}
-- 
2.20.1.7.g153144c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help