From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-rdma@vger.kernel.org,
Chien Tin Tung <chien.tin.tung@intel.com>,
Doug Ledford <dledford@redhat.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Jason Gunthorpe <jgg@ziepe.ca>,
Johannes Berg <johannes.berg@intel.com>,
Leon Romanovsky <leonro@mellanox.com>,
Shiraz Saleem <shiraz.saleem@intel.com>,
Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/3] RDMA/iwpm: Adjust a variable initialisation in iwpm_create_nlmsg()
Date: Sat, 27 Jan 2018 22:20:24 +0100 [thread overview]
Message-ID: <4f13c537-5adb-cb38-5ba6-206699033849@users.sourceforge.net> (raw)
In-Reply-To: <b1df0889-b967-97ae-3a3d-0dde0d7258cd@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
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;
--
2.16.1
next prev parent reply other threads:[~2018-01-27 21:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-27 21:17 [PATCH 0/3] RDMA/iwpm: Adjustments for three function implementations SF Markus Elfring
2018-01-27 21:19 ` [PATCH 1/3] RDMA/iwpm: Delete an error message for a failed memory allocation in iwpm_create_nlmsg() SF Markus Elfring
2018-02-28 21:14 ` Jason Gunthorpe
2018-01-27 21:20 ` SF Markus Elfring [this message]
2018-01-27 21:21 ` [PATCH 3/3] RDMA/iwpm: Improve a size determination in two functions SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4f13c537-5adb-cb38-5ba6-206699033849@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=chien.tin.tung@intel.com \
--cc=dledford@redhat.com \
--cc=geert@linux-m68k.org \
--cc=jgg@ziepe.ca \
--cc=johannes.berg@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=leonro@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=shiraz.saleem@intel.com \
--cc=tatyana.e.nikolova@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®