Skip to content

Commit fe94462

Browse files
Tzung-Bi Shihbroonie
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 5a81178 commit fe94462

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sound/soc/mediatek/mt8183/mt8183-afe-pcm.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,10 +1186,9 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
11861186

11871187
/* request irq */
11881188
irq_id = platform_get_irq(pdev, 0);
1189-
if (!irq_id) {
1190-
dev_err(dev, "%pOFn no irq found\n", dev->of_node);
1191-
return -ENXIO;
1192-
}
1189+
if (irq_id < 0)
1190+
return irq_id;
1191+
11931192
ret = devm_request_irq(dev, irq_id, mt8183_afe_irq_handler,
11941193
IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
11951194
if (ret) {

0 commit comments

Comments
 (0)