From: arvind.yadav.cs@gmail.com (Arvind Yadav)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5 v2] ASoC: intel: mfld: Handle return value of platform_get_irq
Date: Sat, 18 Nov 2017 15:26:49 +0530 [thread overview]
Message-ID: <f77d3cc6ccd2de3f94c0b09c110d970d5c8e0372.1510997815.git.arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <874375c0dca41790e47b60ce30f88ab353f97b38.1510997839.git.arvind.yadav.cs@gmail.com>
platform_get_irq() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
changes in v2 :
Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid.
sound/soc/intel/boards/mfld_machine.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c
index 6f44acf..77b3162 100644
--- a/sound/soc/intel/boards/mfld_machine.c
+++ b/sound/soc/intel/boards/mfld_machine.c
@@ -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;
/* audio interrupt base of SRAM location where
* interrupts are stored by System FW */
--
2.7.4
prev parent reply other threads:[~2017-11-18 9:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-18 9:56 [PATCH 1/3 v3] ASoC: ep93xx-ac97: Fix platform_get_irq's error checking Arvind Yadav
2017-11-18 9:56 ` [PATCH 2/3 v3] ASoC: mt8173: " Arvind Yadav
2017-11-18 9:56 ` [PATCH 3/3 v3] ASoC: nuc900: " Arvind Yadav
2017-11-18 9:56 ` [PATCH 4/5 v2] ASoC: intel: sst: Handle return value of platform_get_irq Arvind Yadav
2017-11-18 9:56 ` Arvind Yadav [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f77d3cc6ccd2de3f94c0b09c110d970d5c8e0372.1510997815.git.arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).