Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1610021

[PATCH] HID: sony: remove redundant check for -ve err

From Colin King <colin.king@canonical.com>
Newsgroups linux.kernel
Subject [PATCH] HID: sony: remove redundant check for -ve err
Date 2017-03-27 20:00 +0200
Message-ID <tpH5T-3my-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Colin Ian King <colin.king@canonical.com>

err is being checked for failure each time it is being updated
so this err check is totally redundant and can be removed

Detected with CoverityScan, CID#1420665 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/hid/hid-sony.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index bb124e339d26..e3c6fe554056 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -2614,9 +2614,6 @@ static int sony_input_configured(struct hid_device *hdev,
 		ret = 0;
 	}
 
-	if (ret < 0)
-		goto err_stop;
-
 	if (sc->quirks & SONY_LED_SUPPORT) {
 		ret = sony_leds_init(sc);
 		if (ret < 0)
-- 
2.11.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] HID: sony: remove redundant check for -ve err Colin King <colin.king@canonical.com> - 2017-03-27 20:00 +0200
  Re: [PATCH] HID: sony: remove redundant check for -ve err Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-03-31 11:10 +0200
  Re: [PATCH] HID: sony: remove redundant check for -ve err Jiri Kosina <jikos@kernel.org> - 2017-04-06 20:40 +0200

csiph-web