[bug report] ASoC: mediatek: mt8173: Enable IRQ when pdata is ready
Dan Carpenter
dan.carpenter at linaro.org
Mon Jun 12 01:04:01 PDT 2023
On Mon, Jun 12, 2023 at 09:42:04AM +0200, Ricardo Ribalda wrote:
> > 1172 ret = snd_soc_add_component(comp_hdmi,
> > 1173 mt8173_afe_hdmi_dais,
> > 1174 ARRAY_SIZE(mt8173_afe_hdmi_dais));
> > 1175 if (ret)
> > 1176 goto err_cleanup_components;
> > 1177
> > 1178 irq_id = platform_get_irq(pdev, 0);
> > 1179 if (irq_id <= 0)
> > --> 1180 return irq_id < 0 ? irq_id : -ENXIO;
> >
> > The comments say platform_get_irq() can't return zero. I believe that
> > the situation there is that official policy is that zero is an invalid
> > IRQ but there are some out of tree ARM stuff where zero is a valid IRQ.
>
> Not sure what you mean here. It looks to me that platform_get_irq can
> indeed return a negative number:
>
> https://elixir.bootlin.com/linux/latest/source/drivers/base/platform.c#L259
>
Negative, yes, but zeroes no. The out of tree ARM stuff where zero is
a valid IRQ is old too btw. On modern stuff zero is not valid.
There are also some IRQ functions which return zero on error (and never
return negative error codes).
>
> >
> > Anyway, missing clean up as well.
>
> Sending a patch right away.
Thanks!
regards,
dan carpenter
More information about the Linux-mediatek
mailing list