lkml.org 
[lkml]   [2017]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] HID: sony: remove redundant check for -ve err
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
>

\
 
 \ /
  Last update: 2017-03-31 11:02    [W:0.046 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site