summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2015-07-13 13:25:34 +0800
committerMark Brown <broonie@kernel.org>2015-07-13 11:52:18 +0100
commite27d9ee6e709db070145847f9b5f52008f6eab84 (patch)
tree21fe1cb3f981ccedead261ae724959d900cbfe3a /sound
parent32a726b2e089ec1851965290a610c4ae9cab3303 (diff)
downloadop-kernel-dev-e27d9ee6e709db070145847f9b5f52008f6eab84.zip
op-kernel-dev-e27d9ee6e709db070145847f9b5f52008f6eab84.tar.gz
ASoC: sti-sas: Fix checking return value for ERR_PTR
Both devm_regmap_init and syscon_regmap_lookup_by_phandle return ERR_PTR on failure. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/sti-sas.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/sti-sas.c b/sound/soc/codecs/sti-sas.c
index 32db2c2..4168b88 100644
--- a/sound/soc/codecs/sti-sas.c
+++ b/sound/soc/codecs/sti-sas.c
@@ -568,17 +568,17 @@ static int sti_sas_driver_probe(struct platform_device *pdev)
/* Request the DAC & SPDIF registers memory region */
drvdata->dac.virt_regmap = devm_regmap_init(&pdev->dev, NULL, drvdata,
drvdata->dev_data->regmap);
- if (!drvdata->dac.virt_regmap) {
+ if (IS_ERR(drvdata->dac.virt_regmap)) {
dev_err(&pdev->dev, "audio registers not enabled\n");
- return -EFAULT;
+ return PTR_ERR(drvdata->dac.virt_regmap);
}
/* Request the syscon region */
drvdata->dac.regmap =
syscon_regmap_lookup_by_phandle(pnode, "st,syscfg");
- if (!drvdata->dac.regmap) {
+ if (IS_ERR(drvdata->dac.regmap)) {
dev_err(&pdev->dev, "syscon registers not available\n");
- return -EFAULT;
+ return PTR_ERR(drvdata->dac.regmap);
}
drvdata->spdif.regmap = drvdata->dac.regmap;
OpenPOWER on IntegriCloud