Skip to content

Commit

Permalink
ASoC: intel: mfld: 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 <arvind.yadav.cs@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
ArvindYadavCs authored and broonie committed Dec 1, 2017
1 parent eee44bf commit 00a5cc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/intel/boards/mfld_machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ static int snd_mfld_mc_probe(struct platform_device *pdev)

/* retrive the irq number */
irq = platform_get_irq(pdev, 0);
if (irq <= 0)
return irq < 0 ? irq : -ENODEV;

/* audio interrupt base of SRAM location where
* interrupts are stored by System FW */
Expand Down

0 comments on commit 00a5cc0

Please sign in to comment.