mirror of https://gitee.com/openkylin/linux.git
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:
parent
81a4362016
commit
89430ef34c
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue