mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
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:
parent
5a8117840a
commit
fe94462519
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user