From: "Arnd Bergmann" <arnd@arndb.de>
To: "Charles Han" <hanchunchao@inspur.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Julien Panis" <jpanis@baylibre.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] misc: tps6594-pfsm: Add NULL check in tps6594_pfsm_probe
Date: Thu, 10 Apr 2025 12:56:06 +0200 [thread overview]
Message-ID: <b1632d8b-d5c2-44dd-bec1-78aa0a71eb03@app.fastmail.com> (raw)
In-Reply-To: <20250410105256.70310-1-hanchunchao@inspur.com>
On Thu, Apr 10, 2025, at 12:52, Charles Han wrote:
> + if (!pfsm->miscdev.name) {
> + devm_kfree(dev, pfsm);
> + return -ENOMEM;
> + }
Since this is the probe function, you don't need to call devm_kfree()
but just let devres take care of it.
Arnd
next prev parent reply other threads:[~2025-04-10 10:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 10:52 Charles Han
2025-04-10 10:56 ` Arnd Bergmann [this message]
2025-04-10 11:50 ` Greg KH
2025-04-10 11:50 ` Greg KH
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=b1632d8b-d5c2-44dd-bec1-78aa0a71eb03@app.fastmail.com \
--to=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=hanchunchao@inspur.com \
--cc=jpanis@baylibre.com \
--cc=linux-kernel@vger.kernel.org \
/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®