mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
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. Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Narasimharao Vadlamudi <ahmisaranrao@gmail.com> Link: https://patch.msgid.link/20260630171333.36396-1-ahmisaranrao@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2f82d58a87
commit
3848617c64
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user