From: Julia Lawall Date: Fri, 28 Jan 2011 05:43:40 +0000 (+0000) Subject: include/net/genetlink.h: Allow genlmsg_cancel to accept a NULL argument X-Git-Tag: v2.6.38-rc4~15^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38db9e1db1c91c953b2a539130257ce91533c9f6;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Signed-off-by: David S. Miller --- diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 8a64b81..b4c7c1c 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); } /**