Re: [PATCH RESEND v6 6/8] mfd: hi6421-spmi-pmic: move driver from staging

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

 



On Thu, Jun 24, 2021 at 02:36:05PM +0200, Mauro Carvalho Chehab wrote:
> Em Thu, 24 Jun 2021 12:33:28 +0100
> Lee Jones <lee.jones@xxxxxxxxxx> escreveu:
> 
> > On Thu, 24 Jun 2021, Mauro Carvalho Chehab wrote:
> > > +static void hi6421_spmi_pmic_remove(struct spmi_device *pdev)
> > > +{
> > > +	struct hi6421_spmi_pmic *ddata = dev_get_drvdata(&pdev->dev);
> > > +
> > > +	free_irq(ddata->irq, ddata);  
> > 
> > No devm_* version?
> 
> Are there a devm_* variant for gpio_to_irq()?
> 

It's the request_threaded_irq() which needs unwound not the gpio_to_irq()
so you could use devm_request_threaded_irq().

Using the devm_ version would fix a leak in probe which Smatch is
supposed to find but does not.  :(

regards,
dan carpenter



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux