summaryrefslogtreecommitdiffstats
path: root/drivers/clk/hisilicon/clk-hi3620.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/hisilicon/clk-hi3620.c')
-rw-r--r--drivers/clk/hisilicon/clk-hi3620.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/clk/hisilicon/clk-hi3620.c b/drivers/clk/hisilicon/clk-hi3620.c
index 2d7186905a..5d0226530f 100644
--- a/drivers/clk/hisilicon/clk-hi3620.c
+++ b/drivers/clk/hisilicon/clk-hi3620.c
@@ -466,8 +466,10 @@ static void __init hi3620_mmc_clk_init(struct device_node *node)
return;
clk_data->clks = kcalloc(num, sizeof(*clk_data->clks), GFP_KERNEL);
- if (!clk_data->clks)
+ if (!clk_data->clks) {
+ kfree(clk_data);
return;
+ }
for (i = 0; i < num; i++) {
struct hisi_mmc_clock *mmc_clk = &hi3620_mmc_clks[i];