Re: [PATCH] backlight: sky81452-backlight: replace of_node_put with __free

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

 




On Wed, 1 May 2024, Daniel Thompson wrote:

> On Wed, May 01, 2024 at 06:21:46PM +0530, R Sundar wrote:
> > Use the new cleanup magic to replace of_node_put() with
> > __free(device_node) marking to auto release when they get out of scope.
> >
> > Suggested-by: Julia Lawall <julia.lawall@xxxxxxxx>
> > Signed-off-by: R Sundar <prosunofficial@xxxxxxxxx>
>
> Thanks for the patch but I think this one is a more appropriate
> solution to this issue:
> https://lore.kernel.org/all/20240421104916.312588-2-shresthprasad7@xxxxxxxxx/

Maybe neither one is perfect?  The one I see at that link has:

 	if (!pdata) {
-		of_node_put(np);
 		return ERR_PTR(-ENOMEM);
 	}

which has unneeded {}

julia


>
>
> Daniel.
>



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux