[alsa-devel] [PATCH] ASoC: max98373: Fix calls to free_gpio()

Zhi, Yong yong.zhi at intel.com
Mon Nov 4 15:46:00 CET 2019


Hi, Kai, Daniel and Mark, 

> -----Original Message-----
> From: Mark Brown <broonie at kernel.org>
> Sent: Monday, November 4, 2019 7:18 AM
> To: Daniel Baluta <daniel.baluta at nxp.com>
> Cc: pierre-louis.bossart at linux.intel.com; Zhi, Yong <yong.zhi at intel.com>;
> Nujella, Sathyanarayana <sathyanarayana.nujella at intel.com>;
> ryans.lee at maximintegrated.com; alsa-devel at alsa-project.org
> Subject: Re: [alsa-devel] [PATCH] ASoC: max98373: Fix calls to free_gpio()
> 
> On Mon, Nov 04, 2019 at 01:03:38PM +0000, Daniel Baluta wrote:
> > On Fri, 2019-11-01 at 12:08 -0500, Yong Zhi wrote:
> > > Don't Call free_gpio() when request_gpio() fails, call it at error
> > > paths to avoid resource leak.
> 
> > Uosing devm_gpio_request will make the change cleaner.
> > What do you think?
> 
> Yes, that's even better.

Acked, will use devm version which is more elegant, thanks for the code review. -Yong 



More information about the Alsa-devel mailing list