public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Colin King <colin.king@canonical.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: sony: remove redundant check for -ve err
Date: Fri, 31 Mar 2017 11:01:31 +0200	[thread overview]
Message-ID: <20170331090131.GG22683@mail.corp.redhat.com> (raw)
In-Reply-To: <20170327175118.28322-1-colin.king@canonical.com>

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
> 

  reply	other threads:[~2017-03-31  9:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27 17:51 [PATCH] HID: sony: remove redundant check for -ve err Colin King
2017-03-31  9:01 ` Benjamin Tissoires [this message]
2017-04-06 18:34 ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170331090131.GG22683@mail.corp.redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=colin.king@canonical.com \
    --cc=jikos@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox