aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/atom/sst
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-11-29 21:47:13 +0530
committerMark Brown <broonie@kernel.org>2017-12-01 13:06:57 +0000
commiteee44bfcf931428d7e94a9ae2092d687386a135a (patch)
tree0efb25cae71aa6b7a0b3f16c27cb0e0be14b5700 /sound/soc/intel/atom/sst
parentASoC: intel: byt: Fix quirk for KIANO laptop (diff)
downloadlinux-dev-eee44bfcf931428d7e94a9ae2092d687386a135a.tar.xz
linux-dev-eee44bfcf931428d7e94a9ae2092d687386a135a.zip
ASoC: intel: sst: Handle return value of platform_get_irq
platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/atom/sst')
-rw-r--r--sound/soc/intel/atom/sst/sst_acpi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c
index 32d6e02e2104..6cd481bec275 100644
--- a/sound/soc/intel/atom/sst/sst_acpi.c
+++ b/sound/soc/intel/atom/sst/sst_acpi.c
@@ -236,6 +236,9 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
/* Find the IRQ */
ctx->irq_num = platform_get_irq(pdev,
ctx->pdata->res_info->acpi_ipc_irq_index);
+ if (ctx->irq_num <= 0)
+ return ctx->irq_num < 0 ? ctx->irq_num : -EIO;
+
return 0;
}