From: Peter Senna Tschudin <peter.senna@gmail.com>
To: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Cc: gregkh@linuxfoundation.org, oneukum@suse.com, bjorn@mork.no,
robert.foss@collabora.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: class: remove logically dead code
Date: Wed, 15 Feb 2017 09:59:26 +0100 [thread overview]
Message-ID: <20170215085926.GA24915@gmail.com> (raw)
In-Reply-To: <20170215031052.GA5519@embeddedgus>
On Tue, Feb 14, 2017 at 09:10:52PM -0600, Gustavo A. R. Silva wrote:
> Remove logically dead code.
> 'cntr' is always equal to zero when the following line of code is executed:
> rv = cntr ? cntr : -EAGAIN;
>
> Addresses-Coverity-ID: 113227
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
> ---
> drivers/usb/class/cdc-wdm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
> index 0a63695..8fda45a 100644
> --- a/drivers/usb/class/cdc-wdm.c
> +++ b/drivers/usb/class/cdc-wdm.c
> @@ -531,7 +531,7 @@ static ssize_t wdm_read
> i++;
> if (file->f_flags & O_NONBLOCK) {
> if (!test_bit(WDM_READ, &desc->flags)) {
> - rv = cntr ? cntr : -EAGAIN;
> + rv = -EAGAIN;
> goto err;
> }
> rv = 0;
> --
> 2.5.0
>
next prev parent reply other threads:[~2017-02-15 8:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 3:10 [PATCH] usb: class: remove logically dead code Gustavo A. R. Silva
2017-02-15 8:59 ` Peter Senna Tschudin [this message]
2017-02-15 9:53 ` Oliver Neukum
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=20170215085926.GA24915@gmail.com \
--to=peter.senna@gmail.com \
--cc=bjorn@mork.no \
--cc=garsilva@embeddedor.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=robert.foss@collabora.com \
/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