lkml.org 
[lkml]   [2019]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] staging: exfat: remove redundant goto
Date
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 :)


[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-08-31 12:30    [W:0.219 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site