ASoC: renesas: fsi: Propagate platform_get_irq() errors
Subsystems (3)
PATCH v2 1/1 ASoC: renesas: fsi: Propagate platform_get_irq() errors
platform_get_irq() returns a positive IRQ number on success and a negative error code on failure. It no longer returns zero. The driver currently stores the return value in an unsigned int and returns -ENODEV for all failures, which loses useful errors such as -EPROBE_DEFER.
Store the IRQ in an int and return the error from platform_get_irq() directly.
---
Changes in v2:
- Mention that platform_get_irq() no longer returns zero.
- Add Acked-by tag from Kuninori Morimoto.
- Add Reviewed-by tag from Geert Uytterhoeven.
sound/soc/renesas/fsi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
sound/soc/renesas/fsi.c +6 -3
@@ -1992,7 +1992,7 @@ static int fsi_probe(struct platform_device *pdev)const struct fsi_core *core;struct fsi_priv *fsi;struct resource *res; -unsigned int irq; +int irq;int ret;memset (&info,0 ,sizeof (info));
@@ -2007,12 +2007,15 @@ static int fsi_probe(struct platform_device *pdev) } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - irq =platform_get_irq (pdev,0 ); -if (!res || (int )irq <=0 ) { +if (!res) {dev_err (&pdev->dev,"Not enough FSI platform resources.\n" );return -ENODEV ; } + irq =platform_get_irq (pdev,0 ); +if (irq <0 ) +return irq; + master =devm_kzalloc (&pdev->dev,sizeof (*master),GFP_KERNEL );if (!master)return -ENOMEM ;
Signature · 1 line
2.43.0
Mark Brown
maintainerQuoted 1 line · Narasimharao Vadlamudi
ASoC: renesas: fsi: Propagate
platform_get_irq()errors
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3
Thanks!
[1/1] ASoC: renesas: fsi: Propagate platform_get_irq() errors
https://git.kernel.org/broonie/sound/c/3848617c64ac
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark