Re: [PATCH] staging: exfat: remove redundant goto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 30 Aug 2019 19:15:23 +0100, Colin King said:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxx>

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: pgp81q8Kv7yM4.pgp
Description: PGP signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux