Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1560218rdb; Sat, 23 Dec 2023 11:27:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHM7RyjMYUSoQc+Nh78CAHCa53Dv8jUg8kwF60PkeD8yBw5qIkYmf05nV2UrUL1KLjOS2PA X-Received: by 2002:a05:6808:3207:b0:3bb:a06e:bef7 with SMTP id cb7-20020a056808320700b003bba06ebef7mr195942oib.110.1703359635532; Sat, 23 Dec 2023 11:27:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703359635; cv=none; d=google.com; s=arc-20160816; b=H8E/qfbopvhCIfDd06CDnNM04qSLDuBg+RCj2PSx6KtYkfb1LUFCfKsDZlnGQbXnhx oHbJ6/a/dqUOUg9XkGOXXOIoF+eicRck0aj/T4aG3lJ9yZn+8BL2DwVoghFDNwMNQijJ JAU51uh/yj69c68D2q5/oiuCNelbZq818/O2cyonJCeMLOt8QnpbqvObCSM3UGSR7Whz 2jr7GpnoFXBU9fYjD/qZI+tGg83sch6cpQGf5j8gumISW7AxS1xrhSI/tIPCv4oVwqKV ly5pQZwnn++qkuEfUtTts0oU3rCk22NDJBhZ7jjzJkDsxU7aBXm+QcGEPfZ3Vv1cidgH gwMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=xZfazrSUxy6tWWKhc77GgAGBpvSLtaBI91i+gYJgWuo=; fh=gxR0Shakz9t4NYmoviWM5nRP/xIkXMHN/AJRvnzy0+s=; b=JzKFHh24vjgYwEk7SqkqnNgp0Bk8LbiSerdWGPdQptdxQof5mw25effXvNo+dB68le E0bTNHMqjZFZ4p7YvyFkZ1ipIg0Vz6vHJkMeDqzNBihRpVXFxF/RjnnyvytaCGJzOjQD nhT9WSArgMiZv0Oj+7Vb+xjnWX3iS6ZYAVXvfSF1D2kwyvZLp4UwEHB0+2qLyunHEzBx 2EPefRcJUi+6swdg4ZLTZ958V6MqACf1nLQ3rtkN0ueyazSHIxdBllHk3EcEELYAQCd0 hJ9d+7ZpLt6uMAHiKaiRe5ME+sfspXSSL/jolnWwzoiZuDzbSoKdJIITNXBNJIqNlfFI HFRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=DRvT13IY; spf=pass (google.com: domain of linux-kernel+bounces-10565-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p16-20020a62ab10000000b006d964149b24si5266194pff.240.2023.12.23.11.27.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 11:27:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10565-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=DRvT13IY; spf=pass (google.com: domain of linux-kernel+bounces-10565-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E80852835B9 for ; Sat, 23 Dec 2023 19:27:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A88D14F7A; Sat, 23 Dec 2023 19:27:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="DRvT13IY" X-Original-To: linux-kernel@vger.kernel.org Received: from mout.web.de (mout.web.de [212.227.15.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C42F7179A1; Sat, 23 Dec 2023 19:27:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1703359341; x=1703964141; i=markus.elfring@web.de; bh=YdAJatdNn222cw6W3QL2m67wBaRz4XfpDHkOgUq/DzM=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References: In-Reply-To; b=DRvT13IYN86qWWYfaYYHMQGACaB4wgzWoWS3gk3x95GEXcjtp/qQhmP2ddXpxmpR 3U1TUhijU+JI2BOr3YuQbPeaxlcgr2ZUrgp/kyMoyG/D3L9EK/kiLjNWO+4xMrA7M XFtoCmHjmcLgRT4z8pmcWWzCxtvsFKlYkv7WilwLnbpoPuzXvSurUbUap5OTUJVtx digFUaZp50o8nTrNc4GPR/GVCvSXZXEpzKHT7BjxiXGjN21dhh1T8tyzc5Vb1HBuM YyF8s+003nVGsfFVSzqDJqMUE5++xPdvly88/TMIGPTgCXm3FNJ+l9eFmApWoEf48 z2+jLdCrUJ/q6bvpCg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.85.95]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1M91LW-1rJr8V0A3q-006YFy; Sat, 23 Dec 2023 20:22:21 +0100 Message-ID: Date: Sat, 23 Dec 2023 20:22:19 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH 2/2] powerpc/powernv/vas: Return directly after a failed kasprintf() in map_paste_region() Content-Language: en-GB From: Markus Elfring To: linuxppc-dev@lists.ozlabs.org, kernel-janitors@vger.kernel.org, "Aneesh Kumar K.V" , Christophe Leroy , Michael Ellerman , "Naveen N. Rao" , Nicholas Piggin Cc: LKML , cocci@inria.fr References: <7be66990-de9e-488b-ad6d-fafd1c7bb34c@web.de> In-Reply-To: <7be66990-de9e-488b-ad6d-fafd1c7bb34c@web.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:iwQeDu1WH1Hs/rx34Ekzp0SH4cpBbM2mbWTPb1Ujg9sRMV1MtuX gioyvZq/vdlkoLQnvzThvnykPLFZzuC+llhzMCsLGNoubqs4RnjZ3/DO3ZaxyH8kiPh86X6 4tzaAWtuSr+WpILDljfOuOoWFNvHhfMAF7CsWVVqya2KuKYmykyhq4lrLdAu2/6mZucSe2L 2HMPjzjgQWhXWBRqK5bVw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:yZKPcLNQDaY=;mP4Sq/6d+Osl3c8Mwq3xGfn65G+ Cy5+3xeihr3bxyKux71Trf6ILjj2DIcDIUmt18T/zGJ62znw0jMhZR6we8zwz/6bFPK7bT1ux 0vYRROAT6T3jA+FNSPbn2lgKAYciOgQGdR5jrgEggtlJR0TWQHSZ1ZI+8UwCO9Hw9a92SQlYs TOMBlmpeFbR4IJubUkjGeS0H+ZCphXEKJpBTjPC7Bcb6YtPclT645Gso2flPViTSPWCplrEej HpeUWa+ePUK51LU2zj92Qb+hEICLkrFzWkLwERFn4GVjBUbbX0hFyELc6Si0+h7PGejF1sF0r ImuOBZY7SQiTsVHFsemFmZ9n5xkl2PDJeteIz6XuiTxwuK6EavKZjBm6DsVnUyz4IE6A9jRYo LimvMDPYW7QF8WRmSNyrEen1UH8rD2saHBG36rnuSyFKC5gKQFTnUZVlB3qeVf6evneM0xhHV Dvi/07QxLwnO1MbKIan2zaFBQxGf0VSLZTIpmDaBIPdJOVD62d1LZI0WBrJd/NKfGoYHTCzgm Q5Kl96pAVli/Ct1DFdRESfDfPDNgHR0CV0XJE/Effb6Ppu7i71TG/aLLVlCh1eNMThstuJk3C OGCMCVO6jyacm/4gHq1Ya66c3zU5w/qfKU2mvHqZx/b89i9Xk0g04aKDz2ZGewVSF+9ZT++8X 5eMQ7FbECCqK+aGDqhgyCW45yXhLHICdVk/QIfISFC6sLzashmKAi7JT7QC9/ZZxhE+VZT2Jp 8WoAbMsv7esgEIt2EY6FWwi6ANGovAJ1SfWTswYMFjJokwFCklRQ+Loco+PMX8RRZK4KlAG3H u2GDnSSQZ5QH56KhGZb2ucnXqlmGGzc9jlwDpSIeQ8PFwlQksvQyQqyqUHG03lTy8RSY44C+y RPMvO2rmKoZ9EM5GYzvgz7lfmLd0LRyTXHFrwIgE5ISh5IZsbmL8l6K6ek6xXbqMpDan+JVA5 QcrSsA== From: Markus Elfring Date: Sat, 23 Dec 2023 19:48:09 +0100 Return directly after a call of the function =E2=80=9Ckasprintf=E2=80=9D f= ailed at the beginning. Signed-off-by: Markus Elfring =2D-- 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/pl= atforms/powernv/vas-window.c index b51219b4b698..2f7d1850b1fa 100644 =2D-- 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 *txw= in) name =3D 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 =3D name; vas_win_paste_addr(txwin, &start, &len); =2D- 2.43.0