linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: linuxppc-dev@lists.ozlabs.org, kernel-janitors@vger.kernel.org,
	"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Michael Ellerman <mpe@ellerman.id.au>,
	"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, cocci@inria.fr
Subject: [PATCH 2/2] powerpc/powernv/vas: Return directly after a failed kasprintf() in map_paste_region()
Date: Sat, 23 Dec 2023 20:22:19 +0100	[thread overview]
Message-ID: <f46f04bc-613c-4e98-b602-4c5120556b09@web.de> (raw)
In-Reply-To: <7be66990-de9e-488b-ad6d-fafd1c7bb34c@web.de>

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


  parent reply	other threads:[~2023-12-23 19:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-23 19:15 [PATCH 0/2] powerpc/powernv/vas: Adjustments for two function implementations Markus Elfring
2023-12-23 19:20 ` [PATCH 1/2] powerpc/powernv/vas: One function call less in vas_window_alloc() after error detection Markus Elfring
2023-12-23 19:22 ` Markus Elfring [this message]
2024-04-15  7:42 ` [0/2] powerpc/powernv/vas: Adjustments for two function implementations Markus Elfring
2024-04-16 11:11   ` Michael Ellerman
2024-04-16 11:32     ` Christophe Leroy
2024-04-16 12:14       ` Markus Elfring
2024-04-16 12:18         ` Christophe Leroy
2024-04-16 12:56           ` Julia Lawall
2024-04-16 13:05             ` Markus Elfring
2024-04-16 14:05       ` [0/2] powerpc/powernv/vas: Adjustments for map_paste_region()? Markus Elfring
2024-04-16 12:04     ` [0/2] powerpc/powernv/vas: Adjustments for two function implementations Markus Elfring

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=f46f04bc-613c-4e98-b602-4c5120556b09@web.de \
    --to=markus.elfring@web.de \
    --cc=aneesh.kumar@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=cocci@inria.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=npiggin@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).