Commit 9c2e955c authored by zhong jiang's avatar zhong jiang Committed by David S. Miller

net/bridge/br_multicast: remove redundant variable "err"

The err is not modified after initalization, So remove it and make
it to be void function.
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent be1459de
...@@ -1423,10 +1423,10 @@ static void br_multicast_query_received(struct net_bridge *br, ...@@ -1423,10 +1423,10 @@ static void br_multicast_query_received(struct net_bridge *br,
br_multicast_mark_router(br, port); br_multicast_mark_router(br, port);
} }
static int br_ip4_multicast_query(struct net_bridge *br, static void br_ip4_multicast_query(struct net_bridge *br,
struct net_bridge_port *port, struct net_bridge_port *port,
struct sk_buff *skb, struct sk_buff *skb,
u16 vid) u16 vid)
{ {
const struct iphdr *iph = ip_hdr(skb); const struct iphdr *iph = ip_hdr(skb);
struct igmphdr *ih = igmp_hdr(skb); struct igmphdr *ih = igmp_hdr(skb);
...@@ -1439,7 +1439,6 @@ static int br_ip4_multicast_query(struct net_bridge *br, ...@@ -1439,7 +1439,6 @@ static int br_ip4_multicast_query(struct net_bridge *br,
unsigned long now = jiffies; unsigned long now = jiffies;
unsigned int offset = skb_transport_offset(skb); unsigned int offset = skb_transport_offset(skb);
__be32 group; __be32 group;
int err = 0;
spin_lock(&br->multicast_lock); spin_lock(&br->multicast_lock);
if (!netif_running(br->dev) || if (!netif_running(br->dev) ||
...@@ -1498,7 +1497,6 @@ static int br_ip4_multicast_query(struct net_bridge *br, ...@@ -1498,7 +1497,6 @@ static int br_ip4_multicast_query(struct net_bridge *br,
out: out:
spin_unlock(&br->multicast_lock); spin_unlock(&br->multicast_lock);
return err;
} }
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
...@@ -1828,7 +1826,7 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br, ...@@ -1828,7 +1826,7 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br,
err = br_ip4_multicast_igmp3_report(br, port, skb_trimmed, vid); err = br_ip4_multicast_igmp3_report(br, port, skb_trimmed, vid);
break; break;
case IGMP_HOST_MEMBERSHIP_QUERY: case IGMP_HOST_MEMBERSHIP_QUERY:
err = br_ip4_multicast_query(br, port, skb_trimmed, vid); br_ip4_multicast_query(br, port, skb_trimmed, vid);
break; break;
case IGMP_HOST_LEAVE_MESSAGE: case IGMP_HOST_LEAVE_MESSAGE:
br_ip4_multicast_leave_group(br, port, ih->group, vid, src); br_ip4_multicast_leave_group(br, port, ih->group, vid, src);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment