diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-01-23 04:17:26 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2018-01-23 04:17:26 -0500 |
commit | d43aeff392b5ba2b7cdf2ed13c2b0b0597f81977 (patch) | |
tree | 5e407e24b27e9c105e0430a4b9afa0bbe307c886 | |
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
-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) | |||
167 | } else { | 167 | } else { |
168 | soc_dev_attr.family = devm_kasprintf(dev, GFP_KERNEL, "QorIQ"); | 168 | soc_dev_attr.family = devm_kasprintf(dev, GFP_KERNEL, "QorIQ"); |
169 | } | 169 | } |
170 | if (!soc_dev_attr.family) | ||
171 | return -ENOMEM; | ||
170 | soc_dev_attr.soc_id = devm_kasprintf(dev, GFP_KERNEL, | 172 | soc_dev_attr.soc_id = devm_kasprintf(dev, GFP_KERNEL, |
171 | "svr:0x%08x", svr); | 173 | "svr:0x%08x", svr); |
174 | if (!soc_dev_attr.soc_id) | ||
175 | return -ENOMEM; | ||
172 | soc_dev_attr.revision = devm_kasprintf(dev, GFP_KERNEL, "%d.%d", | 176 | soc_dev_attr.revision = devm_kasprintf(dev, GFP_KERNEL, "%d.%d", |
173 | (svr >> 4) & 0xf, svr & 0xf); | 177 | (svr >> 4) & 0xf, svr & 0xf); |
178 | if (!soc_dev_attr.revision) | ||
179 | return -ENOMEM; | ||
174 | 180 | ||
175 | soc_dev = soc_device_register(&soc_dev_attr); | 181 | soc_dev = soc_device_register(&soc_dev_attr); |
176 | if (IS_ERR(soc_dev)) | 182 | if (IS_ERR(soc_dev)) |
@@ -214,6 +220,8 @@ static const struct of_device_id fsl_guts_of_match[] = { | |||
214 | { .compatible = "fsl,ls1043a-dcfg", }, | 220 | { .compatible = "fsl,ls1043a-dcfg", }, |
215 | { .compatible = "fsl,ls2080a-dcfg", }, | 221 | { .compatible = "fsl,ls2080a-dcfg", }, |
216 | { .compatible = "fsl,ls1088a-dcfg", }, | 222 | { .compatible = "fsl,ls1088a-dcfg", }, |
223 | { .compatible = "fsl,ls1012a-dcfg", }, | ||
224 | { .compatible = "fsl,ls1046a-dcfg", }, | ||
217 | {} | 225 | {} |
218 | }; | 226 | }; |
219 | MODULE_DEVICE_TABLE(of, fsl_guts_of_match); | 227 | MODULE_DEVICE_TABLE(of, fsl_guts_of_match); |