Re: [RFC PATCH] soc: fsl: guts: handle devm_kstrdup() failure

2018-12-05 Thread Nicholas Mc Guire
On Wed, Dec 05, 2018 at 02:42:55PM -0600, Li Yang wrote: > On Sun, Dec 2, 2018 at 3:07 AM Nicholas Mc Guire wrote: > > > > devm_kstrdup() may return NULL if internal allocation failed. > > soc_dev_attr.machine should be checked (although its only use > > in pr_info() would be safe even with a

Re: [RFC PATCH] soc: fsl: guts: handle devm_kstrdup() failure

2018-12-05 Thread Li Yang
On Sun, Dec 2, 2018 at 3:07 AM Nicholas Mc Guire wrote: > > devm_kstrdup() may return NULL if internal allocation failed. > soc_dev_attr.machine should be checked (although its only use > in pr_info() would be safe even with a NULL). Therefor > in the unlikely case of allocation failure,

[RFC PATCH] soc: fsl: guts: handle devm_kstrdup() failure

2018-12-02 Thread Nicholas Mc Guire
devm_kstrdup() may return NULL if internal allocation failed. soc_dev_attr.machine should be checked (although its only use in pr_info() would be safe even with a NULL). Therefor in the unlikely case of allocation failure, fsl_guts_probe() returns -ENOMEM as this allocating failing is an