From: Shawn Guo <shawnguo@kernel.org>
To: Kunwu Chan <chentao@kylinos.cn>
Cc: linux@armlinux.org.uk, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
arnd@arndb.de, angus.chen@jaguarmicro.com,
u.kleine-koenig@pengutronix.de,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kunwu.chan@hotmail.com,
Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: [PATCH v2] ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init
Date: Wed, 6 Dec 2023 09:44:29 +0800 [thread overview]
Message-ID: <20231206014429.GB236001@dragon> (raw)
In-Reply-To: <20231122064636.7268-1-chentao@kylinos.cn>
On Wed, Nov 22, 2023 at 02:46:36PM +0800, Kunwu Chan wrote:
> devm_kasprintf() returns a pointer to dynamically allocated memory
> which can be NULL upon failure. Ensure the allocation was successful
> by checking the pointer validity.
>
> Release the id allocated in 'mmdc_pmu_init' when 'devm_kasprintf'
> return NULL
>
> Suggested-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> Fixes: e76bdfd7403a ("ARM: imx: Added perf functionality to mmdc driver")
> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Applied, thanks!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2023-12-06 1:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 6:46 [PATCH v2] ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init Kunwu Chan
2023-12-06 1:44 ` Shawn Guo [this message]
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=20231206014429.GB236001@dragon \
--to=shawnguo@kernel.org \
--cc=a.fatoum@pengutronix.de \
--cc=angus.chen@jaguarmicro.com \
--cc=arnd@arndb.de \
--cc=chentao@kylinos.cn \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kunwu.chan@hotmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=s.hauer@pengutronix.de \
--cc=u.kleine-koenig@pengutronix.de \
/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