[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cbc5782c0148422dd524ea1c825731d2232fb7e9.camel@gmail.com>
Date: Tue, 12 Jan 2021 10:13:13 +0100
From: Bean Huo <huobean@...il.com>
To: John Garry <john.garry@...wei.com>, alim.akhtar@...sung.com,
avri.altman@....com, jejb@...ux.ibm.com,
martin.petersen@...cle.com, ebiggers@...gle.com, satyat@...gle.com,
shipujin.t@...il.com
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
Bean Huo <beanhuo@...ron.com>
Subject: Re: [PATCH v2 1/2] scsi: hisi_sas: Remove unnecessary devm_kfree
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@...ron.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
Powered by blists - more mailing lists