aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2014-01-14 13:43:27 -0500
committerSimon Horman <horms+renesas@verge.net.au>2014-02-04 00:28:32 -0500
commitca1187521b78ce4f980cd1b457f8c634dd401021 (patch)
treee787e24ccff17d81e6b96329a0df5cffc994ee25
parent7a543d8124e7e23190d36e7c57d3b9c394c4e4c1 (diff)
ARM: shmobile: koelsch: fix error return code check from clk_get()
The koelsch_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 f31239ef ("ARM: shmobile: koelsch-reference: Instantiate clkdevs for SCIF and CMT") 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: Ben Dooks <ben.dooks@codethink.co.uk> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [horms+renesas@verge.net.au: tweaked changelog] Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r--arch/arm/mach-shmobile/board-koelsch-reference.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
index 652b59268416..feb8d97ea2f7 100644
--- a/arch/arm/mach-shmobile/board-koelsch-reference.c
+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
@@ -45,14 +45,14 @@ static void __init koelsch_add_standard_devices(void)
45 45
46 for (i = 0; i < ARRAY_SIZE(scif_names); ++i) { 46 for (i = 0; i < ARRAY_SIZE(scif_names); ++i) {
47 clk = clk_get(NULL, scif_names[i]); 47 clk = clk_get(NULL, scif_names[i]);
48 if (clk) { 48 if (!IS_ERR(clk)) {
49 clk_register_clkdev(clk, NULL, "sh-sci.%u", i); 49 clk_register_clkdev(clk, NULL, "sh-sci.%u", i);
50 clk_put(clk); 50 clk_put(clk);
51 } 51 }
52 } 52 }
53 53
54 clk = clk_get(NULL, "cmt0"); 54 clk = clk_get(NULL, "cmt0");
55 if (clk) { 55 if (!IS_ERR(clk)) {
56 clk_register_clkdev(clk, NULL, "sh_cmt.0"); 56 clk_register_clkdev(clk, NULL, "sh_cmt.0");
57 clk_put(clk); 57 clk_put(clk);
58 } 58 }