summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/clk/versatile/clk-icst.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/clk/versatile/clk-icst.c')
-rw-r--r--kernel/drivers/clk/versatile/clk-icst.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/drivers/clk/versatile/clk-icst.c b/kernel/drivers/clk/versatile/clk-icst.c
index bc96f103b..08c5ee976 100644
--- a/kernel/drivers/clk/versatile/clk-icst.c
+++ b/kernel/drivers/clk/versatile/clk-icst.c
@@ -13,8 +13,9 @@
* ICST clock code from the ARM tree should probably be merged into this
* file.
*/
-#include <linux/clk.h>
-#include <linux/clkdev.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/export.h>
#include <linux/err.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
@@ -156,8 +157,10 @@ struct clk *icst_clk_register(struct device *dev,
icst->lockreg = base + desc->lock_offset;
clk = clk_register(dev, &icst->hw);
- if (IS_ERR(clk))
+ if (IS_ERR(clk)) {
+ kfree(pclone);
kfree(icst);
+ }
return clk;
}