Re: usb: dwc3: use devm_xxx functions

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

 



On Wed, Feb 15, 2012 at 06:44:54PM +0900, Chanho Park wrote:
> Hi Balbi,
> 
> > -----Original Message-----
> > From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-
> > owner@xxxxxxxxxxxxxxx] On Behalf Of Felipe Balbi
> > Sent: Wednesday, February 15, 2012 6:34 PM
> > To: Chanho Park
> > Cc: balbi@xxxxxx; gregkh@xxxxxxx; linux-usb@xxxxxxxxxxxxxxx; Kyungmin
> > Park
> > Subject: Re: usb: dwc3: use devm_xxx functions
> > 
> > Hi,
> > 
> > On Wed, Feb 15, 2012 at 06:27:55PM +0900, Chanho Park wrote:
> > > @@ -595,9 +586,6 @@ static int __devexit dwc3_remove(struct
> > platform_device *pdev)
> > >  	}
> > >
> > >  	dwc3_core_exit(dwc);
> > > -	release_mem_region(res->start, resource_size(res));
> > > -	iounmap(dwc->regs);
> > > -	kfree(dwc->mem);
> > 
> > don't you need to anyways call devm_kfree() here ?
> 
> We don't need devm_kfree in the xxx_remove function.
> It is automatically freed on driver detach.
> See http://www.kernel.org/doc/htmldocs/device-drivers/API-devm-kzalloc.html

Cool, thanks. Will let it cook for a couple of days and if no one has
any concerns I'll apply.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux