]> asedeno.scripts.mit.edu Git - linux.git/commit
ethernet: aquantia: remove redundant checks on error status
authorColin Ian King <colin.king@canonical.com>
Thu, 11 May 2017 18:29:40 +0000 (19:29 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 May 2017 01:42:17 +0000 (21:42 -0400)
commitd2be3667f3769b3c60aa294ef7f2b03d1b16559c
tree7b1efca88a07566ad12108fb349064b4fc421a3c
parent69a73e744db1a57175039e3d1e6ef3913e816eb8
ethernet: aquantia: remove redundant checks on error status

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.  It may seem that the err should be assigned to the
return code of the call to the various *offload_en_set calls and
then we check for failure, however, these functions are void and
never actually return any status.

Since these error 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>
Reviewed-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Acked-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c