[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140325000705.32624.49820@quantum>
Date: Mon, 24 Mar 2014 17:07:05 -0700
From: Mike Turquette <mturquette@...aro.org>
To: Krzysztof Kozlowski <k.kozlowski@...sung.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-samsung-soc@...r.kernel.org
Cc: "Tushar Behera" <tushar.behera@...aro.org>,
"Kyungmin Park" <kyungmin.park@...sung.com>,
"Marek Szyprowski" <m.szyprowski@...sung.com>,
"Bartlomiej Zolnierkiewicz" <b.zolnierkie@...sung.com>,
"Tomasz Figa" <t.figa@...sung.com>,
"Krzysztof Kozlowski" <k.kozlowski@...sung.com>,
stable@...r.kernel.org
Subject: Re: [PATCH 1/2] clk: s2mps11: Fix possible NULL pointer dereference
Quoting Krzysztof Kozlowski (2014-03-21 05:18:17)
> If parent device does not have of_node set the s2mps11_clk_parse_dt()
> returned NULL. This NULL was later passed to of_clk_add_provider() which
> dereferenced it in pr_debug() call.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
I've taken both of these patches into clk-next.
Thanks!
Mike
> Cc: <stable@...r.kernel.org>
> ---
> drivers/clk/clk-s2mps11.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
> index 00a3abe103a5..27c83e45eaed 100644
> --- a/drivers/clk/clk-s2mps11.c
> +++ b/drivers/clk/clk-s2mps11.c
> @@ -130,7 +130,7 @@ static struct device_node *s2mps11_clk_parse_dt(struct platform_device *pdev)
> int i;
>
> if (!iodev->dev->of_node)
> - return NULL;
> + return ERR_PTR(-EINVAL);
>
> clk_np = of_find_node_by_name(iodev->dev->of_node, "clocks");
> if (!clk_np) {
> --
> 1.7.9.5
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists