From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] hv: util: checking the wrong variable
Date: Tue, 02 Jun 2015 12:15:38 +0000 [thread overview]
Message-ID: <87wpzmwbkl.fsf@vitty.brq.redhat.com> (raw)
Dan Carpenter <dan.carpenter@oracle.com> writes:
> We don't catch this allocation failure because there is a typo and we
> check the wrong variable.
>
> Fixes: 14b50f80c32d ('Drivers: hv: util: introduce hv_utils_transport abstraction')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Thanks, Dan!
>
> diff --git a/drivers/hv/hv_utils_transport.c b/drivers/hv/hv_utils_transport.c
> index ea7ba5e..6a9d80a 100644
> --- a/drivers/hv/hv_utils_transport.c
> +++ b/drivers/hv/hv_utils_transport.c
> @@ -186,7 +186,7 @@ int hvutil_transport_send(struct hvutil_transport *hvt, void *msg, int len)
> return -EINVAL;
> } else if (hvt->mode = HVUTIL_TRANSPORT_NETLINK) {
> cn_msg = kzalloc(sizeof(*cn_msg) + len, GFP_ATOMIC);
> - if (!msg)
> + if (!cn_msg)
> return -ENOMEM;
> cn_msg->id.idx = hvt->cn_id.idx;
> cn_msg->id.val = hvt->cn_id.val;
--
Vitaly
next reply other threads:[~2015-06-02 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 12:15 Vitaly Kuznetsov [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-05-29 15:12 [patch] hv: util: checking the wrong variable Dan Carpenter
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=87wpzmwbkl.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).