diff options
author | Julia Lawall <julia@diku.dk> | 2011-01-28 05:43:40 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-03 20:47:08 -0800 |
commit | 38db9e1db1c91c953b2a539130257ce91533c9f6 (patch) | |
tree | b907832971ddcc434ece367da89a0926bdd6cb22 /include/net/genetlink.h | |
parent | e2d57766e6744f2956975dd2086d82957187b0f6 (diff) | |
download | linux-38db9e1db1c91c953b2a539130257ce91533c9f6.tar.gz linux-38db9e1db1c91c953b2a539130257ce91533c9f6.tar.bz2 linux-38db9e1db1c91c953b2a539130257ce91533c9f6.zip |
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>
Diffstat (limited to 'include/net/genetlink.h')
-rw-r--r-- | include/net/genetlink.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 8a64b811a39a..b4c7c1cbcf40 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h @@ -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) { - nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); + if (hdr) + nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); } /** |