These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / clk / versatile / clk-icst.c
index bc96f10..08c5ee9 100644 (file)
@@ -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;
 }