From patchwork Sat Jan 27 21:20:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10187651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D8FA3602C8 for ; Sat, 27 Jan 2018 21:20:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6C7921F61 for ; Sat, 27 Jan 2018 21:20:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA92326E38; Sat, 27 Jan 2018 21:20:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D00621F61 for ; Sat, 27 Jan 2018 21:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753082AbeA0VUm (ORCPT ); Sat, 27 Jan 2018 16:20:42 -0500 Received: from mout.web.de ([212.227.17.11]:52977 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751505AbeA0VUl (ORCPT ); Sat, 27 Jan 2018 16:20:41 -0500 Received: from [192.168.1.2] ([78.49.117.84]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M40zO-1exUWO1o02-00rWqj; Sat, 27 Jan 2018 22:20:26 +0100 Subject: [PATCH 2/3] RDMA/iwpm: Adjust a variable initialisation in iwpm_create_nlmsg() From: SF Markus Elfring To: linux-rdma@vger.kernel.org, Chien Tin Tung , Doug Ledford , Geert Uytterhoeven , Jason Gunthorpe , Johannes Berg , Leon Romanovsky , Shiraz Saleem , Tatyana Nikolova Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <4f13c537-5adb-cb38-5ba6-206699033849@users.sourceforge.net> Date: Sat, 27 Jan 2018 22:20:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:xslIxnocZJScaz5KrpXkPCfELubXKhKmvuhh6niZ/du3B1Uvesp ONs7CaF5gbdxXDRPpbr9pfbmEw1G8y/7mLRAT5AYoruyIDIt7ovBcQA3HVLM72HtVgVT0u0 FuDSXjCzlLdINJf49/X2qGuEfd8eWoGWCpMkkwBsEBOdTFKDp8IxKTxbeXkXefyavWTe4k8 0WoRP6s9n75PN6CKE5TRg== X-UI-Out-Filterresults: notjunk:1; V01:K0:g/cZDGQjDFQ=:mXkjNoiATIvdVH9FUOmprq amj9/awF/ySssC+BIohBkr295KOkdYyRnyQvs9vTNY8z6cSZO6v+mlIyDHL/TCC0YYju2dLuD FK+L5G/morYHRbr0DlGYfUsks4OiiTX00IgQlk0UnnoGwU2qFgYgDfLG30/McHDzzTCW+6LCb T2tos/IdKSrSSazFM82U8NkVi8w1yuKWCj/eOkjcPHhlFx02vggglEEyB2zPyqC790ixmjNBf +FO64c3cv+yirHDt5CNLsUPXXc4JuqwX+e3Mh5gWPZM+tqu9tf6iExjmdZmg80pteyu2eWNan Dp1tsiZGDQDxburGCUsBa9lKnWWEvPknnWaBq7HvV0iuucSODSUpNUjpFFl2T/AFgFjgeNi2C Fpirk3j5HuuNLY/EshqYwPjxzpBVGdSW1LO46FocoAsAnQvOKfPdSZysmp1qYhY+ZONCMVyQL Mow5Ukl0f5m8GwvgtPQkUIB+/5d930JuH3njiKFkkKcD9xmHAP1bPoMLH11g7jtqBwncR4T4K QUMzN9DAeQgd7+BFSBCjTi3bfrluCTOQw/nmUSb5jw40DjbuJYukNW2/Uw2V80rhRXqBEph5n vqIJnC/zzu4InBwh7yku9dHfscrgRhljAwwESQq89ykrRoR40c+JPteomORlGOil5VauyTVEw 35azFVpsycMAemvJ3vhPbbzFTeffBEA3CSBaVyN+Cmk8i2TSMD3ftRJpdGrtkdOwTx3PTDExu i4EUFzgDzw+7JnzA07TVj/IqisfH0XkHR3LVReISTYLJnj7WwobzHKKyRsLiHg5m+ICG2UQvo xRaLcthS8jPGxXui5XpUmWZn5avXWY9CeG3e7FsrkKD+c7KiOE= Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sat, 27 Jan 2018 21:56:54 +0100 The local variable "skb" will be reassigned by a following statement. Thus adjust the initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/infiniband/core/iwpm_util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/core/iwpm_util.c b/drivers/infiniband/core/iwpm_util.c index 9821ae900f6d..9eb527074c32 100644 --- a/drivers/infiniband/core/iwpm_util.c +++ b/drivers/infiniband/core/iwpm_util.c @@ -436,9 +436,8 @@ int iwpm_compare_sockaddr(struct sockaddr_storage *a_sockaddr, struct sk_buff *iwpm_create_nlmsg(u32 nl_op, struct nlmsghdr **nlh, int nl_client) { - struct sk_buff *skb = NULL; + struct sk_buff *skb = dev_alloc_skb(IWPM_MSG_SIZE); - skb = dev_alloc_skb(IWPM_MSG_SIZE); if (!skb) goto create_nlmsg_exit;