* [PATCH][next] HID: sony: remove redundant assignment to variable ret
@ 2024-03-28 12:22 Colin Ian King
2024-04-12 15:56 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-03-28 12:22 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires, linux-input
Cc: kernel-janitors, linux-kernel
The variable ret is being assigned a value that is never read
afterwards. The assignment is redundant and can be removed.
Cleans up clang scan build warning:
drivers/hid/hid-sony.c:2020:3: warning: Value stored to 'ret'
is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/hid/hid-sony.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index ebc0aa4e4345..1d37b39e1171 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -2016,8 +2016,6 @@ static int sony_input_configured(struct hid_device *hdev,
} else if (sc->quirks & MOTION_CONTROLLER) {
sony_init_output_report(sc, motion_send_output_report);
- } else {
- ret = 0;
}
if (sc->quirks & SONY_LED_SUPPORT) {
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] HID: sony: remove redundant assignment to variable ret
2024-03-28 12:22 [PATCH][next] HID: sony: remove redundant assignment to variable ret Colin Ian King
@ 2024-04-12 15:56 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2024-04-12 15:56 UTC (permalink / raw)
To: Colin Ian King
Cc: Benjamin Tissoires, linux-input, kernel-janitors, linux-kernel
On Thu, 28 Mar 2024, Colin Ian King wrote:
> The variable ret is being assigned a value that is never read
> afterwards. The assignment is redundant and can be removed.
>
> Cleans up clang scan build warning:
> drivers/hid/hid-sony.c:2020:3: warning: Value stored to 'ret'
> is never read [deadcode.DeadStores]
That assignment is indeed bogus. Applied, thanks.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-12 15:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28 12:22 [PATCH][next] HID: sony: remove redundant assignment to variable ret Colin Ian King
2024-04-12 15:56 ` Jiri Kosina
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.