mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: colin.king@canonical.com
Cc: pavel.belous@aquantia.com, Dmitrii.Tarakanov@aquantia.com,
	Alexander.Loktionov@aquantia.com, vomlehn@texas.net,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ethernet: aquantia: remove redundant checks on error status
Date: Thu, 11 May 2017 14:16:23 -0400 (EDT)	[thread overview]
Message-ID: <20170511.141623.1200573443845531222.davem@davemloft.net> (raw)
In-Reply-To: <20170511172929.12951-1-colin.king@canonical.com>

From: Colin King <colin.king@canonical.com>
Date: Thu, 11 May 2017 18:29:29 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> The error status err is initialized as zero and then being checked
> several times to see if it is less than zero even when it has not
> been updated. Since these checks are redundant we can remove these
> as well as err and the error exit label err_exit.
> 
> Detected by CoverityScan, CID#1398313 and CID#1398306 ("Logically
> dead code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Please enhance your commit message to also explain that the functions
being called around these checks all return void, to make it clear
that this isn't an issue of the return values not being checked.

Thanks.

  reply	other threads:[~2017-05-11 18:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-11 17:29 Colin King
2017-05-11 18:16 ` David Miller [this message]
2017-05-11 18:18   ` Colin Ian King

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=20170511.141623.1200573443845531222.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Alexander.Loktionov@aquantia.com \
    --cc=Dmitrii.Tarakanov@aquantia.com \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pavel.belous@aquantia.com \
    --cc=vomlehn@texas.net \
    /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

all inboxes | Powered by JetHome®