net: bridge: remove redundant check to see if err is set
authorColin Ian King <colin.king@canonical.com>
Tue, 7 Feb 2017 10:56:38 +0000 (10:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Feb 2017 19:04:29 +0000 (14:04 -0500)
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>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netlink.c

index 1cbdc5b96aa7d717ebe7896a59ffc2cdd4b787e7..a8f6acd23e309dcf51e6825076d9b3ba00996a9c 100644 (file)
@@ -612,9 +612,6 @@ static int br_afspec(struct net_bridge *br,
                                return err;
                        break;
                }
-
-               if (err)
-                       return err;
        }
 
        return err;