diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-11-29 21:47:13 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-12-01 13:06:57 +0000 |
commit | eee44bfcf931428d7e94a9ae2092d687386a135a (patch) | |
tree | 0efb25cae71aa6b7a0b3f16c27cb0e0be14b5700 /sound/soc/intel/atom | |
parent | 56fa898be862053327b2ff8abfa0a6e7f350f81d (diff) | |
download | linux-eee44bfcf931428d7e94a9ae2092d687386a135a.tar.gz linux-eee44bfcf931428d7e94a9ae2092d687386a135a.tar.bz2 linux-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')
-rw-r--r-- | sound/soc/intel/atom/sst/sst_acpi.c | 3 |
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; } |