linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] accel/habanalabs/gaudi2: Use kvfree() for memory allocated with kvcalloc()
@ 2024-04-01 22:38 Thorsten Blum
  0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2024-04-01 22:38 UTC (permalink / raw)
  To: Oded Gabbay, Ofir Bitton, Tomer Tayar, Dani Liberman, Farah Kassabri
  Cc: Dafna Hirschfeld, Moti Haimovski, Koby Elbaz, dri-devel,
	linux-kernel, Thorsten Blum

Fixes the following Coccinelle/coccicheck warning reported by
kfree_mismatch.cocci:

	WARNING kvmalloc is used to allocate this memory at line 10398

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
---
 drivers/accel/habanalabs/gaudi2/gaudi2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c
index fa1c4feb9f89..8024047962ec 100644
--- a/drivers/accel/habanalabs/gaudi2/gaudi2.c
+++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c
@@ -10489,7 +10489,7 @@ static int gaudi2_memset_device_memory(struct hl_device *hdev, u64 addr, u64 siz
 				(u64 *)(lin_dma_pkts_arr), DEBUGFS_WRITE64);
 	WREG32(sob_addr, 0);
 
-	kfree(lin_dma_pkts_arr);
+	kvfree(lin_dma_pkts_arr);
 
 	return rc;
 }
-- 
2.44.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-01 22:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-01 22:38 [PATCH] accel/habanalabs/gaudi2: Use kvfree() for memory allocated with kvcalloc() Thorsten Blum

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).