diff options
author | Ben Dooks <ben.dooks@codethink.co.uk> | 2014-01-14 13:43:26 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2014-02-04 00:28:32 -0500 |
commit | 7a543d8124e7e23190d36e7c57d3b9c394c4e4c1 (patch) | |
tree | fd7d149afe4cebddabe5d6fb516a7c8498885a9e | |
parent | 317af6612ee29dfcb5ae04df9c58e9f79fc8d4ff (diff) |
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: 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-lager-reference.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index a6e271d92af0..dc8d76b9a9f1 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c | |||
@@ -44,14 +44,14 @@ static void __init lager_add_standard_devices(void) | |||
44 | 44 | ||
45 | for (i = 0; i < ARRAY_SIZE(scif_names); ++i) { | 45 | for (i = 0; i < ARRAY_SIZE(scif_names); ++i) { |
46 | clk = clk_get(NULL, scif_names[i]); | 46 | clk = clk_get(NULL, scif_names[i]); |
47 | if (clk) { | 47 | if (!IS_ERR(clk)) { |
48 | clk_register_clkdev(clk, NULL, "sh-sci.%u", i); | 48 | clk_register_clkdev(clk, NULL, "sh-sci.%u", i); |
49 | clk_put(clk); | 49 | clk_put(clk); |
50 | } | 50 | } |
51 | } | 51 | } |
52 | 52 | ||
53 | clk = clk_get(NULL, "cmt0"); | 53 | clk = clk_get(NULL, "cmt0"); |
54 | if (clk) { | 54 | if (!IS_ERR(clk)) { |
55 | clk_register_clkdev(clk, NULL, "sh_cmt.0"); | 55 | clk_register_clkdev(clk, NULL, "sh_cmt.0"); |
56 | clk_put(clk); | 56 | clk_put(clk); |
57 | } | 57 | } |