From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxx> --- 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