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: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e2d57766e6
commit
38db9e1db1
1 changed files with 2 additions and 1 deletions
|
@ -195,6 +195,7 @@ 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)
|
||||||
{
|
{
|
||||||
|
if (hdr)
|
||||||
nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN);
|
nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue