Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1610021 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-03-27 20:00 +0200 |
| Last post | 2017-04-06 20:40 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[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
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-03-27 20:00 +0200 |
| Subject | [PATCH] HID: sony: remove redundant check for -ve err |
| Message-ID | <tpH5T-3my-5@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Benjamin Tissoires <benjamin.tissoires@redhat.com> |
|---|---|
| Date | 2017-03-31 11:10 +0200 |
| Message-ID | <tr0Jd-2AS-81@gated-at.bofh.it> |
| In reply to | #1610021 |
On Mar 27 2017 or thereabouts, Colin King wrote:
> 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>
> ---
Indeed. Not sure if it will conflict with Roderick's series, but still:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cheers,
Benjamin
> 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
>
[toc] | [prev] | [next] | [standalone]
| From | Jiri Kosina <jikos@kernel.org> |
|---|---|
| Date | 2017-04-06 20:40 +0200 |
| Message-ID | <ttku6-4wp-23@gated-at.bofh.it> |
| In reply to | #1610021 |
On Mon, 27 Mar 2017, Colin King wrote:
> 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>
Applied to for-4.12/sony.
--
Jiri Kosina
SUSE Labs
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web