mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
net: netlink: add the case when nlh is NULL
Add the case when nlh is NULL in nlmsg_report(), so that the caller doesn't need to deal with this case. Signed-off-by: Yajun Deng <yajun.deng@linux.dev> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b0e8181762
commit
f9b282b36d
3 changed files with 6 additions and 11 deletions
|
@ -726,12 +726,8 @@ void rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, u32 group,
|
|||
struct nlmsghdr *nlh, gfp_t flags)
|
||||
{
|
||||
struct sock *rtnl = net->rtnl;
|
||||
int report = 0;
|
||||
|
||||
if (nlh)
|
||||
report = nlmsg_report(nlh);
|
||||
|
||||
nlmsg_notify(rtnl, skb, pid, group, report, flags);
|
||||
nlmsg_notify(rtnl, skb, pid, group, nlmsg_report(nlh), flags);
|
||||
}
|
||||
EXPORT_SYMBOL(rtnl_notify);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue