Re: [PATCH] ethernet: aquantia: remove redundant checks on error status

From: David Miller
Date: Thu May 11 2017 - 14:16:31 EST


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

> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxx>

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.