summaryrefslogtreecommitdiff
path: root/drivers/clk/versatile/clk-sp810.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/versatile/clk-sp810.c')
-rw-r--r--drivers/clk/versatile/clk-sp810.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c
index a1cdef6b0f90..e78755e0ef78 100644
--- a/drivers/clk/versatile/clk-sp810.c
+++ b/drivers/clk/versatile/clk-sp810.c
@@ -95,13 +95,12 @@ static void __init clk_sp810_of_setup(struct device_node *node)
int i;
bool deprecated;
- if (!sp810) {
- pr_err("Failed to allocate memory for SP810!\n");
+ if (!sp810)
return;
- }
if (of_clk_parent_fill(node, parent_names, num) != num) {
pr_warn("Failed to obtain parent clocks for SP810!\n");
+ kfree(sp810);
return;
}