platform_get_irq() returns negative value on error instead of 0. Signed-off-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx> --- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) The patch is inspired by https://patchwork.kernel.org/patch/11531297/ 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) { -- 2.26.2.526.g744177e7f7-goog