Re: [PATCH 1/2] soc: imx: soc-imx8: Avoid unnecessary of_node_put() in error handling

From: Leonard Crestez
Date: Tue May 21 2019 - 07:06:39 EST


On 5/21/2019 12:18 PM, Anson Huang wrote:
> of_node_put() is called after of_match_node() successfully called,
> then in the following error handling, of_node_put() is called again
> which is unnecessary, this patch adjusts the location of of_node_put()
> to avoid such scenario.
>
> Signed-off-by: Anson Huang <Anson.Huang@xxxxxxx>

For both:

Reviewed-by: Leonard Crestez <leonard.crestez@xxxxxxx>

I was thinking that maybe you could of_node_put as soon as you were done
with it but the model is read straight into soc_dev_attr so just freeing
everything at the end makes more sense.