On Tue, Jul 16, 2019 at 10:48 AM Hans Verkuil <hverkuil-ci...@xs4all.nl> wrote:
...
> > @@ -297,8 +298,6 @@ static int dw_hdmi_cec_probe(struct platform_device 
> > *pdev)
> >        */
> >       devm_remove_action(&pdev->dev, dw_hdmi_cec_del, cec);
>
> I have to say that I find this remove action very confusing since it is
> not obvious that this deletes the adapter on error. I would prefer that
> the action is dropped and the normal 'goto' pattern is used for error
> handling. Much easier to review.
>
> What do you think?
>
This pattern indeed seems uncommon - there are only a couple of
references to devm_remove_action in the kernel, if I am counting this
right. I am not sure, though, if this patch is the right place to make
changes to the way resources are unwound.

Regards.

Reply via email to