Re: [patch] gpio: rcar: NULL dereference on error in probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 7, 2013 at 4:56 PM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> 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 <dan.carpenter@xxxxxxxxxx>
>
> diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
> index d3f15ae..fe088a3 100644
> --- a/drivers/gpio/gpio-rcar.c
> +++ b/drivers/gpio/gpio-rcar.c
> @@ -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 <damm@xxxxxxxxxxxxx>

Cheers,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux