Re: [PATCH v2 08/20] pinctrl: st: Use scope based of_node_put() cleanups
From: Andy Shevchenko
Date: Thu May 30 2024 - 05:05:32 EST
Sat, May 04, 2024 at 09:20:06PM +0800, Peng Fan (OSS) kirjoitti:
> From: Peng Fan <peng.fan@xxxxxxx>
>
> Use scope based of_node_put() cleanup to simplify code.
..
> struct property *pp;
> struct device *dev = info->dev;
> struct st_pinconf *conf;
> - struct device_node *pins;
> + struct device_node *pins __free(device_node) = NULL;
It's better to move it upper to follow reversed xmas tree order (okay, to some
extent in this case).
> phandle bank;
> unsigned int offset;
> - int i = 0, npins = 0, nr_props, ret = 0;
> + int i = 0, npins = 0, nr_props;
--
With Best Regards,
Andy Shevchenko