Skip to content

Commit

Permalink
include/net/genetlink.h: Allow genlmsg_cancel to accept a NULL argument
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Julia Lawall authored and davem330 committed Feb 4, 2011
1 parent e2d5776 commit 38db9e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/net/genetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 38db9e1

Please sign in to comment.