Re: [PATCH v3 3/9] dw-hdmi-cec: use cec_notifier_cec_adap_(un)register

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

 



On Tue, Jul 16, 2019 at 10:48 AM Hans Verkuil <hverkuil-cisco@xxxxxxxxx> 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.



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux