Commit fe944625 authored by Tzung-Bi Shih's avatar Tzung-Bi Shih Committed by Mark Brown

ASoC: mediatek: mt8183: fix error handling of platform_get_irq()

platform_get_irq() returns negative value on error instead of 0.
Signed-off-by: default avatarTzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200507015442.191336-1-tzungbi@google.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5a811784
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment