[PATCH drm/hisilicon 2/3] drm/irq: Add the new api to install irq

Sam Ravnborg sam at ravnborg.org
Thu Dec 3 21:33:34 UTC 2020


Hi Tian,

> > +	ret = devm_add_action_or_reset(dev->dev, devm_drm_irq_uninstall, dev);
> > +	if (ret)
> > +		devm_drm_irq_uninstall(dev);
> devm_add_action_or_reset() will call devm_drm_irq_uninstall() if ret is
> != 0. See include/device.h.
> 
> I guess that is the "_or_reset" part of the name that can tell us that.
> So you can drop the if condition as it just will cause the code to call
> drm_irq_uninstall() twice.

Noticed this was fixed in v2 - so all is fine here.

	Sam


More information about the dri-devel mailing list