From: Bean Huo <huobean@gmail.com>
To: John Garry <john.garry@huawei.com>,
alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, ebiggers@google.com,
satyat@google.com, shipujin.t@gmail.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Bean Huo <beanhuo@micron.com>
Subject: Re: [PATCH v2 1/2] scsi: hisi_sas: Remove unnecessary devm_kfree
Date: Tue, 12 Jan 2021 10:13:13 +0100 [thread overview]
Message-ID: <cbc5782c0148422dd524ea1c825731d2232fb7e9.camel@gmail.com> (raw)
In-Reply-To: <b34eac20-e194-783b-f29e-83eec8bb127c@huawei.com>
On Tue, 2021-01-12 at 09:03 +0000, John Garry wrote:
> On 11/01/2021 23:10, Bean Huo wrote:
> > From: Bean Huo <beanhuo@micron.com>
> >
> > The memory allocated with devm_kzalloc() is freed automatically
> > no need to explicitly call devm_kfree.
> >
>
> This change is not right - we use devm_kfree() to manually release
> the
> devm-allocated debugfs memories upon memory allocation failure for
> driver debugfs feature during probe. The reason is that we allow the
> driver probe can still continue (for this failure).
>
> Thanks,
> John
yea, I see, probe didn't deal with ENOMEM error. will drop this change.
thanks.
Bean
next prev parent reply other threads:[~2021-01-12 9:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 23:10 [PATCH v2 0/2] " Bean Huo
2021-01-11 23:10 ` [PATCH v2 1/2] scsi: hisi_sas: " Bean Huo
2021-01-12 9:03 ` John Garry
2021-01-12 9:13 ` Bean Huo [this message]
2021-01-11 23:10 ` [PATCH v2 2/2] scsi: ufs: " Bean Huo
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=cbc5782c0148422dd524ea1c825731d2232fb7e9.camel@gmail.com \
--to=huobean@gmail.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=ebiggers@google.com \
--cc=jejb@linux.ibm.com \
--cc=john.garry@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=satyat@google.com \
--cc=shipujin.t@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
all inboxes | Powered by JetHome®