OSDN Git Service

soc: fsl: guts: reuse machine name from device tree
authorLi Yang <leoyang.li@nxp.com>
Fri, 11 Jan 2019 21:55:57 +0000 (15:55 -0600)
committerLi Yang <leoyang.li@nxp.com>
Fri, 11 Jan 2019 22:08:43 +0000 (16:08 -0600)
commit3c0d64e867ed78a782a8a00d3b519396d9c5a2db
tree4b310af8210970f53d2fa0933b958021db75e27c
parent8a533a7de21aa69cf9a3e55223c819858fbc7da2
soc: fsl: guts: reuse machine name from device tree

Reuse the string machine from the device tree data structure instead
of duplicating the data again.  This also prevents a potential memory
allocation failure that was not handled previously.  Also fixes an early
put of root device node.

Reported-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
drivers/soc/fsl/guts.c