From: Dan Carpenter Date: Thu, 7 Nov 2013 07:56:51 +0000 (+0300) Subject: gpio: rcar: NULL dereference on error in probe() X-Git-Tag: v3.12.3~167 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf9f229b9b367f9c92b495cc061078c028eb5e98;p=kernel%2Fkernel-generic.git gpio: rcar: NULL dereference on error in probe() commit 0c8aab8e65e450f2bfea494c1b6a86ded653f88c upstream. 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 Acked-by: Magnus Damm Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index 6038966..8f64b67 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -380,7 +380,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,