From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: Colin King <colin.king@canonical.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: exfat: remove redundant goto
Date: Sat, 31 Aug 2019 06:30:18 -0400 [thread overview]
Message-ID: <295459.1567247418@turing-police> (raw)
In-Reply-To: <20190830181523.13356-1-colin.king@canonical.com>
[-- Attachment #1: Type: text/plain, Size: 718 bytes --]
On Fri, 30 Aug 2019 19:15:23 +0100, Colin King said:
> From: Colin Ian King <colin.king@canonical.com>
>
> The goto after a return is never executed, so it is redundant and can
> be removed.
>
> Addresses-Coverity: ("Structurally dead code")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Good catch....
> - if (dentry < -1) {
> + if (dentry < -1)
> return FFS_NOTFOUND;
> - goto out;
> - }
But the wrong fix. The code *used* to have returns like this all over the
place, but that meant it returns with a lock held - whoops. The *other* 287 or
so places I changed to 'ret = FFS_yaddayadda', followed by a 'goto out' but I
apparently missed one.
And thanks a bunch for feeding it to Coverity :)
[-- Attachment #2: Type: application/pgp-signature, Size: 832 bytes --]
prev parent reply other threads:[~2019-08-31 10:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 18:15 Colin King
2019-08-31 10:30 ` Valdis Klētnieks [this message]
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=295459.1567247418@turing-police \
--to=valdis.kletnieks@vt.edu \
--cc=colin.king@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@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
all inboxes | Powered by JetHome®