mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] intel_th: Fix dma_map_sg error check
@ 2022-08-26 10:15 Jack Wang
  2022-08-26 10:31 ` Christophe JAILLET
  0 siblings, 1 reply; 3+ messages in thread
From: Jack Wang @ 2022-08-26 10:15 UTC (permalink / raw)
  To: alexander.shishkin; +Cc: linux-kernel

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)
 		goto err_free_pages;
 
 	msc->nr_pages = nr_pages;
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-26 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26 10:15 [PATCH] intel_th: Fix dma_map_sg error check Jack Wang
2022-08-26 10:31 ` Christophe JAILLET
2022-08-26 10:39   ` Jinpu Wang

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®