diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-01-23 10:17:26 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2018-01-23 10:17:26 +0100 |
commit | d43aeff392b5ba2b7cdf2ed13c2b0b0597f81977 (patch) | |
tree | 5e407e24b27e9c105e0430a4b9afa0bbe307c886 /drivers/soc | |
parent | e2105ca8beb0c776a52ae8d18bc6b564745de2e4 (diff) | |
parent | 14b055f43915a81be46d7e98f6f237bee62c6b0c (diff) |
Merge tag 'soc-fsl-for-4.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/leo/linux into next/drivers
Pull "FSL/NXP SoC drivers updates for 4.16" from Li Yang:
This adds new SoC support and more error path handling to the guts
driver.
* tag 'soc-fsl-for-4.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/leo/linux:
soc: fsl: guts: Add a NULL check for devm_kasprintf()
soc: fsl: support GUTS driver for ls1012a/ls1046a
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/fsl/guts.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c index d89a6a80c8ef..302e0c8d69d9 100644 --- a/drivers/soc/fsl/guts.c +++ b/drivers/soc/fsl/guts.c @@ -167,10 +167,16 @@ static int fsl_guts_probe(struct platform_device *pdev) } else { soc_dev_attr.family = devm_kasprintf(dev, GFP_KERNEL, "QorIQ"); } + if (!soc_dev_attr.family) + return -ENOMEM; soc_dev_attr.soc_id = devm_kasprintf(dev, GFP_KERNEL, "svr:0x%08x", svr); + if (!soc_dev_attr.soc_id) + return -ENOMEM; soc_dev_attr.revision = devm_kasprintf(dev, GFP_KERNEL, "%d.%d", (svr >> 4) & 0xf, svr & 0xf); + if (!soc_dev_attr.revision) + return -ENOMEM; soc_dev = soc_device_register(&soc_dev_attr); if (IS_ERR(soc_dev)) @@ -214,6 +220,8 @@ static const struct of_device_id fsl_guts_of_match[] = { { .compatible = "fsl,ls1043a-dcfg", }, { .compatible = "fsl,ls2080a-dcfg", }, { .compatible = "fsl,ls1088a-dcfg", }, + { .compatible = "fsl,ls1012a-dcfg", }, + { .compatible = "fsl,ls1046a-dcfg", }, {} }; MODULE_DEVICE_TABLE(of, fsl_guts_of_match); |