summaryrefslogtreecommitdiff
path: root/sound/soc/mediatek
diff options
context:
space:
mode:
authorTzung-Bi Shih <tzungbi@google.com>2020-05-07 09:54:42 +0800
committerMark Brown <broonie@kernel.org>2020-05-07 12:51:30 +0100
commitfe944625194515e99fcbfb0d190d50986e2b6480 (patch)
tree40fae97892c7f228e4643213a5638750bf75ea30 /sound/soc/mediatek
parent5a8117840a8c654c3cdf2f465e9406112d7e492d (diff)
downloadlwn-fe944625194515e99fcbfb0d190d50986e2b6480.tar.gz
lwn-fe944625194515e99fcbfb0d190d50986e2b6480.zip
ASoC: mediatek: mt8183: fix error handling of platform_get_irq()
platform_get_irq() returns negative value on error instead of 0. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200507015442.191336-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/mediatek')
-rw-r--r--sound/soc/mediatek/mt8183/mt8183-afe-pcm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
index c8ded53bde1d..e0c4714da92c 100644
--- a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
+++ b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c
@@ -1186,10 +1186,9 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
/* request irq */
irq_id = platform_get_irq(pdev, 0);
- if (!irq_id) {
- dev_err(dev, "%pOFn no irq found\n", dev->of_node);
- return -ENXIO;
- }
+ if (irq_id < 0)
+ return irq_id;
+
ret = devm_request_irq(dev, irq_id, mt8183_afe_irq_handler,
IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
if (ret) {