Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1639992

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

From Lino Sanfilippo <LinoSanfilippo@gmx.de>
Newsgroups linux.kernel
Subject Re: [PATCH][V2] ethernet: aquantia: remove redundant checks on error status
Date 2017-05-11 22:00 +0200
Message-ID <tG2pH-2dr-3@gated-at.bofh.it> (permalink)
References <tG10C-1rf-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On 11.05.2017 20:29, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> 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>

FWIW:


Reviewed-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>

Regards,
Lino

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH][V2] ethernet: aquantia: remove redundant checks on error status Colin King <colin.king@canonical.com> - 2017-05-11 20:30 +0200
  Re: [PATCH][V2] ethernet: aquantia: remove redundant checks on error  status Lino Sanfilippo <LinoSanfilippo@gmx.de> - 2017-05-11 22:00 +0200
  Re: [PATCH][V2] ethernet: aquantia: remove redundant checks on  error status David Miller <davem@davemloft.net> - 2017-05-12 03:50 +0200

csiph-web