mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Jack Wang <jinpu.wang@ionos.com>, alexander.shishkin@linux.intel.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] intel_th: Fix dma_map_sg error check
Date: Fri, 26 Aug 2022 12:31:15 +0200	[thread overview]
Message-ID: <50bfdb3f-f6fe-b0ef-4214-5d533d45e89c@wanadoo.fr> (raw)
In-Reply-To: <20220826101523.79502-1-jinpu.wang@ionos.com>

Le 26/08/2022 à 12:15, Jack Wang a écrit :
> dma_map_sg return 0 on error.
> 
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: linux-kernel@vger.kernel.org
> Fixes: 4e0eaf239fb3 ("intel_th: msu: Fix single mode with IOMMU")
> Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
> ---
>   drivers/hwtracing/intel_th/msu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
> index 6c8215a47a60..b49237d56a60 100644
> --- a/drivers/hwtracing/intel_th/msu.c
> +++ b/drivers/hwtracing/intel_th/msu.c
> @@ -931,7 +931,7 @@ static int msc_buffer_contig_alloc(struct msc *msc, unsigned long size)
>   
>   	ret = dma_map_sg(msc_dev(msc)->parent->parent, msc->single_sgt.sgl, 1,
>   			 DMA_FROM_DEVICE);
> -	if (ret < 0)
> +	if (!ret)

Missing ret = -EIO?
like in other patches?

CJ

>   		goto err_free_pages;
>   
>   	msc->nr_pages = nr_pages;


  reply	other threads:[~2022-08-26 10:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26 10:15 Jack Wang
2022-08-26 10:31 ` Christophe JAILLET [this message]
2022-08-26 10:39   ` Jinpu Wang

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=50bfdb3f-f6fe-b0ef-4214-5d533d45e89c@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jinpu.wang@ionos.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®