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.hu...@nxp.com>
For both: Reviewed-by: Leonard Crestez <leonard.cres...@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.