Commit a878002b authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

gpio: rcar: NULL dereference on error in probe()

commit 0c8aab8e upstream.

It's not obvious from the label name but "err1" tries to release
"p->irq_domain" which leads to a NULL dereference.

Fixes: 119f5e44 ('gpio: Renesas R-Car GPIO driver V3')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aeb94017
......@@ -329,7 +329,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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment