diff mbox series

[next] HID: sony: remove redundant assignment to variable ret

Message ID 20240328122213.762889-1-colin.i.king@gmail.com
State Accepted
Commit 4e124ed0da2939dcd27849a3d6f41fbc537a20be
Headers show
Series [next] HID: sony: remove redundant assignment to variable ret | expand

Commit Message

Colin Ian King March 28, 2024, 12:22 p.m. UTC
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(-)

Comments

Jiri Kosina April 12, 2024, 3:56 p.m. UTC | #1
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.
diff mbox series

Patch

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) {