netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][net-next] net: bridge: remove redundant check to see if err is set
@ 2017-02-07 10:56 Colin King
  2017-02-07 11:30 ` Nikolay Aleksandrov
  2017-02-07 19:05 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Colin King @ 2017-02-07 10:56 UTC (permalink / raw)
  To: Stephen Hemminger, David S . Miller, bridge, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The error check on err is redundant as it is being checked
previously each time it has been updated.  Remove this redundant
check.

Detected with CoverityScan, CID#140030("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 net/bridge/br_netlink.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index fc5d885..cdc4e2a 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -612,9 +612,6 @@ static int br_afspec(struct net_bridge *br,
 				return err;
 			break;
 		}
-
-		if (err)
-			return err;
 	}
 
 	return err;
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-07 19:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-07 10:56 [PATCH][net-next] net: bridge: remove redundant check to see if err is set Colin King
2017-02-07 11:30 ` Nikolay Aleksandrov
2017-02-07 11:43   ` Colin Ian King
2017-02-07 19:05 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).