From: Mike Turquette <mturquette@linaro.org>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Cc: "Tushar Behera" <tushar.behera@linaro.org>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Marek Szyprowski" <m.szyprowski@samsung.com>,
"Bartlomiej Zolnierkiewicz" <b.zolnierkie@samsung.com>,
"Tomasz Figa" <t.figa@samsung.com>,
"Krzysztof Kozlowski" <k.kozlowski@samsung.com>,
stable@vger.kernel.org
Subject: Re: [PATCH 1/2] clk: s2mps11: Fix possible NULL pointer dereference
Date: Mon, 24 Mar 2014 17:07:05 -0700 [thread overview]
Message-ID: <20140325000705.32624.49820@quantum> (raw)
In-Reply-To: <1395404297-12133-1-git-send-email-k.kozlowski@samsung.com>
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@samsung.com>
I've taken both of these patches into clk-next.
Thanks!
Mike
> Cc: <stable@vger.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
>
prev parent reply other threads:[~2014-03-25 0:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-21 12:18 [PATCH 1/2] clk: s2mps11: Fix possible NULL pointer dereference Krzysztof Kozlowski
2014-03-25 0:07 ` Mike Turquette [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140325000705.32624.49820@quantum \
--to=mturquette@linaro.org \
--cc=b.zolnierkie@samsung.com \
--cc=k.kozlowski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=stable@vger.kernel.org \
--cc=t.figa@samsung.com \
--cc=tushar.behera@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).