gpio: rcar: NULL dereference on error in probe()
Subsystems (3)
PATCH 1/1 gpio: rcar: NULL dereference on error in probe()
It's not obvious from the label name but "err1" tries to release "p->irq_domain" which leads to a NULL dereference.
Fixes 119f5e448d32 ('gpio: Renesas R-Car GPIO driver V3')
Signed-off-by Dan Carpenter <[email protected]>
drivers/gpio/gpio-rcar.c +1 -1
@@ -381,7 +381,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)if (!p->irq_domain) { ret = -ENXIO ;dev_err (&pdev->dev,"cannot initialize irq domain\n" ); - goto err1; + goto err0; } if (devm_request_irq(&pdev->dev, irq->start,
Quoted 11 lines · Dan Carpenter
It's not obvious from the label name but "err1" tries to release "
p->irq_domain" which leads to a NULL dereference.Fixes 119f5e448d32 ('gpio: Renesas R-Car GPIO driver V3')Signed-off-by Dan Carpenter <[email protected]>drivers/gpio/gpio-rcar.c +0
-0
drivers/gpio/gpio-rcar.c static int gpio_rcar_probe(struct platform_device *pdev) · line 387
Quoted 8 lines
drivers/gpio/gpio-rcar.c +1
-1@@ -381,7 +381,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)if (!p->irq_domain) { ret = -ENXIO ;dev_err (&pdev->dev,"cannot initialize irq domain\n" ); - goto err1; + goto err0; } if (devm_request_irq(&pdev->dev, irq->start,
Hey Dan,
Thanks a lot for the patch, it looks correct to me.
Acked-by Magnus Damm <[email protected]>
Cheers,
/ magnus
Quoted 5 lines · Dan Carpenter
It's not obvious from the label name but "err1" tries to release "
p->irq_domain" which leads to a NULL dereference.Fixes 119f5e448d32 ('gpio: Renesas R-Car GPIO driver V3')Signed-off-by Dan Carpenter <[email protected]>
Applied for fixes with Magnus' ACK and tagged for stable.
Yours,
Linus Walleij