summaryrefslogtreecommitdiffstats
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authorYunjian Wang <wangyunjian@huawei.com>2021-01-05 07:31:34 +0100
committerDavid S. Miller <davem@davemloft.net>2021-01-06 01:52:02 +0100
commit89430ef34c5b13f916acd1f1f86f1106f4d958c9 (patch)
tree8f25abcec3ef2438f055ea9be803dae0597b096a /drivers/net/macvlan.c
parentocteontx2-pf: Add RSS multi group support (diff)
downloadlinux-89430ef34c5b13f916acd1f1f86f1106f4d958c9.tar.xz
linux-89430ef34c5b13f916acd1f1f86f1106f4d958c9.zip
macvlan: remove redundant null check on data
Because macvlan_common_newlink() and macvlan_changelink() already checked NULL data parameter, so the additional check is unnecessary, just remove it. Fixes: 79cf79abce71 ("macvlan: add source mode") Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index fb51329f8964..9a9a5cf36a4b 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -1385,7 +1385,7 @@ static int macvlan_changelink_sources(struct macvlan_dev *vlan, u32 mode,
return ret;
}
- if (!data || !data[IFLA_MACVLAN_MACADDR_DATA])
+ if (!data[IFLA_MACVLAN_MACADDR_DATA])
return 0;
head = nla_data(data[IFLA_MACVLAN_MACADDR_DATA]);