From: Arvind Yadav Date: Wed, 29 Nov 2017 16:17:13 +0000 (+0530) Subject: ASoC: intel: sst: Handle return value of platform_get_irq X-Git-Tag: for-linus-20180204~18^2~16^2~20^2~12 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=eee44bfcf931428d7e94a9ae2092d687386a135a;p=linux-block.git 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 Signed-off-by: Mark Brown --- 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; }