提交 7a543d81 编写于 作者: B Ben Dooks 提交者: Simon Horman

ARM: shmobile: lager: fix error return code check from clk_get()

The lager_add_standard_devices() function calls clk_get() but then fails
to check that it returns an error pointer instead of NULL on failure.

This was added by 4a606af2 ("ARM: shmobile: lager-reference: Instantiate
clkdevs for SCIF and CMT") patch in Simon Horman's renesas-boards2-for-v3.14
tag.

The issue is not serious as it does not cause a crash and seems to not be
actually causing any issues now the other clock bugs have been fixed.
Signed-off-by: NBen Dooks <ben.dooks@codethink.co.uk>
Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
[horms+renesas@verge.net.au: tweaked changelog]
Signed-off-by: NSimon Horman <horms+renesas@verge.net.au>
上级 317af661
......@@ -44,14 +44,14 @@ static void __init lager_add_standard_devices(void)
for (i = 0; i < ARRAY_SIZE(scif_names); ++i) {
clk = clk_get(NULL, scif_names[i]);
if (clk) {
if (!IS_ERR(clk)) {
clk_register_clkdev(clk, NULL, "sh-sci.%u", i);
clk_put(clk);
}
}
clk = clk_get(NULL, "cmt0");
if (clk) {
if (!IS_ERR(clk)) {
clk_register_clkdev(clk, NULL, "sh_cmt.0");
clk_put(clk);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册