soc: fsl: guts: Add a missing memory allocation failure check
If 'devm_kstrdup()' fails, we should return -ENOMEM. While at it, move the 'of_node_put()' call in the error handling path and after the 'machine' has been copied. Better safe than sorry. Fixes: a6fc3b69 ("soc: fsl: add GUTS driver for QorIQ platforms") Depends-on: fddacc7ff4dd ("soc: fsl: guts: Revert commit 3c0d64e8") Suggested-by: NTyrel Datwyler <tyreld@linux.ibm.com> Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NLi Yang <leoyang.li@nxp.com>
Showing
想要评论请 注册 或 登录