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>
This commit is contained in:
Tzung-Bi Shih 2020-05-07 09:54:42 +08:00 committed by Mark Brown
parent 5a8117840a
commit fe94462519
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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) {