From patchwork Fri Jan 28 15:43:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 80856 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id ACA59B7106 for ; Sat, 29 Jan 2011 02:44:15 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753417Ab1A1Pnq (ORCPT ); Fri, 28 Jan 2011 10:43:46 -0500 Received: from mgw2.diku.dk ([130.225.96.92]:44845 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752338Ab1A1Pnp (ORCPT ); Fri, 28 Jan 2011 10:43:45 -0500 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id 8DBF819BBA7; Fri, 28 Jan 2011 16:43:44 +0100 (CET) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27229-05; Fri, 28 Jan 2011 16:43:40 +0100 (CET) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw2.diku.dk (Postfix) with ESMTP id C04D319BBA5; Fri, 28 Jan 2011 16:43:40 +0100 (CET) Received: from pc-004.diku.dk (pc-004.diku.dk [130.225.97.4]) by nhugin.diku.dk (Postfix) with ESMTP id CD3206DF89F; Fri, 28 Jan 2011 16:38:01 +0100 (CET) Received: by pc-004.diku.dk (Postfix, from userid 3767) id A65B864001; Fri, 28 Jan 2011 16:43:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by pc-004.diku.dk (Postfix) with ESMTP id A3BB168001; Fri, 28 Jan 2011 16:43:40 +0100 (CET) Date: Fri, 28 Jan 2011 16:43:40 +0100 (CET) From: Julia Lawall To: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, paul.moore@hp.com, kernel-janitors@vger.kernel.org Subject: [PATCH] include/net/genetlink.h: Allow genlmsg_cancel to accept a NULL argument Message-ID: MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- include/net/genetlink.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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); } /**