[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f46f04bc-613c-4e98-b602-4c5120556b09@web.de>
Date: Sat, 23 Dec 2023 20:22:19 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: linuxppc-dev@...ts.ozlabs.org, kernel-janitors@...r.kernel.org,
"Aneesh Kumar K.V" <aneesh.kumar@...nel.org>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Michael Ellerman <mpe@...erman.id.au>,
"Naveen N. Rao" <naveen.n.rao@...ux.ibm.com>,
Nicholas Piggin <npiggin@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>, cocci@...ia.fr
Subject: [PATCH 2/2] powerpc/powernv/vas: Return directly after a failed
kasprintf() in map_paste_region()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 23 Dec 2023 19:48:09 +0100
Return directly after a call of the function “kasprintf” failed
at the beginning.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
arch/powerpc/platforms/powernv/vas-window.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch/powerpc/platforms/powernv/vas-window.c
index b51219b4b698..2f7d1850b1fa 100644
--- a/arch/powerpc/platforms/powernv/vas-window.c
+++ b/arch/powerpc/platforms/powernv/vas-window.c
@@ -78,7 +78,7 @@ static void *map_paste_region(struct pnv_vas_window *txwin)
name = kasprintf(GFP_KERNEL, "window-v%d-w%d", txwin->vinst->vas_id,
txwin->vas_win.winid);
if (!name)
- goto free_name;
+ return ERR_PTR(-ENOMEM);
txwin->paste_addr_name = name;
vas_win_paste_addr(txwin, &start, &len);
--
2.43.0
Powered by blists - more mailing lists