[PATCH][next] drivers: video: Simplify device_node cleanup using __free

Shresth Prasad shresthprasad7 at gmail.com
Fri Apr 19 18:52:41 UTC 2024


> Please fix the subject line to be "backlight: <driver>: ...". I came
> very close to deleting this patch without reading it ;-) .

Really sorry about that, I'll fix it.

> Do we need to get dev->of_node at all? The device, which we are
> borrowing, already owns a reference to the node so I don't see
> any point in this function taking an extra one.
>
> So why not simply make this:
>
>     struct device_node *np = dev->of_node;

Looking at it again, I'm not sure why the call to `of_node_put` is there in the first place. I think removing it will be fine.

I'll fix both of these issues and send a patch v2.

Regards,
Shresth


More information about the dri-devel mailing list