clk: st: Terminate of match table
[firefly-linux-kernel-4.4.55.git] / drivers / clk / st / clkgen-pll.c
index bca0a0badbfa68c176aa0e82b663682b53845834..d8b9b1a2aeda7bd8715f42634c0aa5853845d713 100644 (file)
@@ -521,8 +521,10 @@ static struct clk * __init clkgen_odf_register(const char *parent_name,
        gate->lock = odf_lock;
 
        div = kzalloc(sizeof(*div), GFP_KERNEL);
-       if (!div)
+       if (!div) {
+               kfree(gate);
                return ERR_PTR(-ENOMEM);
+       }
 
        div->flags = CLK_DIVIDER_ONE_BASED | CLK_DIVIDER_ALLOW_ZERO;
        div->reg = reg + pll_data->odf[odf].offset;
@@ -653,6 +655,7 @@ static struct of_device_id c32_gpu_pll_of_match[] = {
                .compatible = "st,stih416-gpu-pll-c32",
                .data = &st_pll1200c32_gpu_416,
        },
+       {}
 };
 
 static void __init clkgengpu_c32_pll_setup(struct device_node *np)