diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2018-01-27 21:48:01 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-02-28 13:57:39 -0700 |
commit | c7ec83772a08d84e5e6a774a7c49ec1d6dc2dd88 (patch) | |
tree | 86c704ff539508f9eb5ae7d6e49da57865b191e0 /drivers/infiniband/core | |
parent | b7c5bc73680dfcb1bdc3a1c77c0344f045ac017d (diff) | |
download | linux-stable-c7ec83772a08d84e5e6a774a7c49ec1d6dc2dd88.tar.gz linux-stable-c7ec83772a08d84e5e6a774a7c49ec1d6dc2dd88.tar.bz2 linux-stable-c7ec83772a08d84e5e6a774a7c49ec1d6dc2dd88.zip |
RDMA/iwpm: Delete an error message for a failed memory allocation in iwpm_create_nlmsg()
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/iwpm_util.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/core/iwpm_util.c b/drivers/infiniband/core/iwpm_util.c index 81528f64061a..9821ae900f6d 100644 --- a/drivers/infiniband/core/iwpm_util.c +++ b/drivers/infiniband/core/iwpm_util.c @@ -439,10 +439,9 @@ struct sk_buff *iwpm_create_nlmsg(u32 nl_op, struct nlmsghdr **nlh, struct sk_buff *skb = NULL; skb = dev_alloc_skb(IWPM_MSG_SIZE); - if (!skb) { - pr_err("%s Unable to allocate skb\n", __func__); + if (!skb) goto create_nlmsg_exit; - } + if (!(ibnl_put_msg(skb, nlh, 0, 0, nl_client, nl_op, NLM_F_REQUEST))) { pr_warn("%s: Unable to put the nlmsg header\n", __func__); |