From: Markus Elfring <Markus.Elfring@web.de>
To: vulab@iscas.ac.cn, linux-fsi@lists.ozlabs.org,
Eddie James <eajames@linux.ibm.com>,
Ninad Palsule <ninad@linux.ibm.com>
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fsi: master-gpio: Fix reference count leak in probe error path
Date: Mon, 8 Dec 2025 16:10:50 +0100 [thread overview]
Message-ID: <2c9af5ae-c250-4760-a9bb-aeec61c61eb1@web.de> (raw)
In-Reply-To: <20251208033606.10647-1-vulab@iscas.ac.cn>
…
> Add the missing of_node_put() in the error handling path to properly
> release the device tree node reference.
…
> +++ b/drivers/fsi/fsi-master-gpio.c
> @@ -861,6 +861,7 @@ static int fsi_master_gpio_probe(struct platform_device *pdev)
> }
> return 0;
> err_free:
> + of_node_put(master->master.dev.of_node);
Is there a need to rename the label accordingly?
> kfree(master);
Can it be helpful to move the statement “rc = PTR_ERR(gpio);”
also into the exception handling of this function implementation?
> return rc;
> }
…
Regards,
Markus
prev parent reply other threads:[~2025-12-08 15:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 3:36 Wentao Liang
2025-12-08 15:10 ` Markus Elfring [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=2c9af5ae-c250-4760-a9bb-aeec61c61eb1@web.de \
--to=markus.elfring@web.de \
--cc=eajames@linux.ibm.com \
--cc=linux-fsi@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ninad@linux.ibm.com \
--cc=stable@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
/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
all inboxes | Powered by JetHome®