From: Markus Elfring <Markus.Elfring@web.de>
To: Felix Gu <ustc.gu@gmail.com>,
linux-riscv@lists.infradead.org,
Conor Dooley <conor.dooley@microchip.com>,
Daire McNamara <daire.mcnamara@microchip.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] soc: microchip: mpfs: Fix a memory leak in mpfs_sys_controller_probe()
Date: Tue, 3 Feb 2026 17:00:44 +0100 [thread overview]
Message-ID: <7ad7ccba-5ef7-48b7-ae45-f631e574df3b@web.de> (raw)
In-Reply-To: <20260203-mpfs-v1-1-666b8704f8f7@gmail.com>
> In mpfs_sys_controller_probe(), when of_get_mtd_device_by_node() fails,
> the previously allocated sys_controller was leaked.
>
> Add kfree() to fix this.
https://elixir.bootlin.com/linux/v6.19-rc5/source/drivers/soc/microchip/mpfs-sys-controller.c#L128-L177
* Were any source code analysis tools involved here?
* Would you like to complete the exception handling by using another goto chain?
* How do you think about to increase the application of scope-based resource management?
* See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v6.19-rc8#n34
Regards,
Markus
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-02-03 16:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 13:03 [PATCH] soc: microchip: mpfs: Fix a memory leak in mpfs_sys_controller_probe() Felix Gu
2026-02-03 16:00 ` Markus Elfring [this message]
2026-02-06 19:52 ` Conor Dooley
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=7ad7ccba-5ef7-48b7-ae45-f631e574df3b@web.de \
--to=markus.elfring@web.de \
--cc=conor.dooley@microchip.com \
--cc=daire.mcnamara@microchip.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=ustc.gu@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