qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
To: Yuval Shaia <yuval.shaia@oracle.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] hw/pvrdma: Check the correct return value
Date: Mon, 29 Oct 2018 10:57:21 +0200	[thread overview]
Message-ID: <82b0b0d9-202c-3646-ae9a-429ab9dd577a@gmail.com> (raw)
In-Reply-To: <20181025061700.17050-1-yuval.shaia@oracle.com>



On 10/25/18 9:17 AM, Yuval Shaia wrote:
> Return value of 0 means ok, we want to free the memory only in case of
> error.
>
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
>   hw/rdma/vmw/pvrdma_cmd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c
> index 4faeb21631..57d6f41ae6 100644
> --- a/hw/rdma/vmw/pvrdma_cmd.c
> +++ b/hw/rdma/vmw/pvrdma_cmd.c
> @@ -232,7 +232,7 @@ static int create_mr(PVRDMADev *dev, union pvrdma_cmd_req *req,
>                                        cmd->start, cmd->length, host_virt,
>                                        cmd->access_flags, &resp->mr_handle,
>                                        &resp->lkey, &resp->rkey);
> -    if (host_virt && !resp->hdr.err) {
> +    if (resp->hdr.err && host_virt) {
>           munmap(host_virt, cmd->length);
>       }
>   

Reviewed-by: Marcel Apfelbaum<marcel.apfelbaum@gmail.com>

Thanks,
Marcel

      reply	other threads:[~2018-10-29  7:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-25  6:17 [Qemu-devel] [PATCH] hw/pvrdma: Check the correct return value Yuval Shaia
2018-10-29  8:57 ` Marcel Apfelbaum [this message]

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=82b0b0d9-202c-3646-ae9a-429ab9dd577a@gmail.com \
    --to=marcel.apfelbaum@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yuval.shaia@oracle.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;
as well as URLs for NNTP newsgroup(s).