Commit 89430ef3 authored by Yunjian Wang's avatar Yunjian Wang Committed by David S. Miller

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: 79cf79ab ("macvlan: add source mode")
Signed-off-by: default avatarYunjian Wang <wangyunjian@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 81a43620
...@@ -1385,7 +1385,7 @@ static int macvlan_changelink_sources(struct macvlan_dev *vlan, u32 mode, ...@@ -1385,7 +1385,7 @@ static int macvlan_changelink_sources(struct macvlan_dev *vlan, u32 mode,
return ret; return ret;
} }
if (!data || !data[IFLA_MACVLAN_MACADDR_DATA]) if (!data[IFLA_MACVLAN_MACADDR_DATA])
return 0; return 0;
head = nla_data(data[IFLA_MACVLAN_MACADDR_DATA]); head = nla_data(data[IFLA_MACVLAN_MACADDR_DATA]);
......
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