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: 79cf79abce ("macvlan: add source mode")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Yunjian Wang 2021-01-05 14:31:34 +08:00 committed by David S. Miller
parent 81a4362016
commit 89430ef34c
1 changed files with 1 additions and 1 deletions

View File

@ -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]);