Messages in this thread | | | From | Leonard Crestez <> | Subject | Re: [PATCH 1/2] soc: imx: soc-imx8: Avoid unnecessary of_node_put() in error handling | Date | Tue, 21 May 2019 11:03:57 +0000 |
| |
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@nxp.com>
For both:
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
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.
| |