Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38db9e1d authored by Julia Lawall's avatar Julia Lawall Committed by David S. Miller
Browse files

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: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e2d57766
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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)
{
	if (hdr)
		nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN);
}