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

From: Sam Ravnborg
Date: Thu Dec 03 2020 - 16:34:40 EST


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