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

- From: Dan Carpenter \<hidden\>
- Date: 2021-06-24 13:08:20 
- List: linux-devicetree
- Page: https://ratatoskr.run/linux-devicetree/2021/06/1424897
- Thread: https://ratatoskr.run/linux-devicetree/2021/06/1424607/t.md

```text
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 [ref] 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
```
