提交 38db9e1d 编写于 作者: J Julia Lawall 提交者: David S. Miller

include/net/genetlink.h: Allow genlmsg_cancel to accept a NULL argument

nlmsg_cancel can accept NULL as its second argument, so for similarity,
this patch extends genlmsg_cancel to be able to accept a NULL second
argument as well.
Signed-off-by: NJulia Lawall <julia@diku.dk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e2d57766
...@@ -195,7 +195,8 @@ static inline int genlmsg_end(struct sk_buff *skb, void *hdr) ...@@ -195,7 +195,8 @@ static inline int genlmsg_end(struct sk_buff *skb, void *hdr)
*/ */
static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr) static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr)
{ {
nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); if (hdr)
nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN);
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册