[Bridge] [patch] bridge: simplify br_getlink() a bit

David Miller davem at davemloft.net
Mon Jan 26 07:33:16 UTC 2015


From: Dan Carpenter <dan.carpenter at oracle.com>
Date: Wed, 21 Jan 2015 12:22:35 +0300

> Static checkers complain that we should maybe set "ret" before we do the
> "goto out;".  They interpret the NULL return from br_port_get_rtnl() as
> a failure and forgetting to set the error code is a common bug in this
> situation.
> 
> The code is confusing but it's actually correct.  We are returning zero
> deliberately.  Let's re-write it a bit to be more clear.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>

Applied to net-next, thanks.



More information about the Bridge mailing list