Re: [PATCH v2 1/2] scsi: hisi_sas: Remove unnecessary devm_kfree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> > 
> > 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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux