Skip to content

Commit

Permalink
ASoC: intel: sst: Handle return value of platform_get_irq
Browse files Browse the repository at this point in the history
platform_get_irq() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
ArvindYadavCs authored and broonie committed Dec 1, 2017
1 parent 56fa898 commit eee44bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/intel/atom/sst/sst_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit eee44bf

Please sign in to comment.