File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -667,6 +667,8 @@ static int mtk_topckgen_init(struct platform_device *pdev)
667
667
return PTR_ERR (base );
668
668
669
669
clk_data = mtk_alloc_clk_data (CLK_TOP_NR );
670
+ if (!clk_data )
671
+ return - ENOMEM ;
670
672
671
673
mtk_clk_register_fixed_clks (top_fixed_clks , ARRAY_SIZE (top_fixed_clks ),
672
674
clk_data );
@@ -747,6 +749,8 @@ static void __init mtk_infrasys_init_early(struct device_node *node)
747
749
748
750
if (!infra_clk_data ) {
749
751
infra_clk_data = mtk_alloc_clk_data (CLK_INFRA_NR );
752
+ if (!infra_clk_data )
753
+ return ;
750
754
751
755
for (i = 0 ; i < CLK_INFRA_NR ; i ++ )
752
756
infra_clk_data -> hws [i ] = ERR_PTR (- EPROBE_DEFER );
@@ -774,6 +778,8 @@ static int mtk_infrasys_init(struct platform_device *pdev)
774
778
775
779
if (!infra_clk_data ) {
776
780
infra_clk_data = mtk_alloc_clk_data (CLK_INFRA_NR );
781
+ if (!infra_clk_data )
782
+ return - ENOMEM ;
777
783
} else {
778
784
for (i = 0 ; i < CLK_INFRA_NR ; i ++ ) {
779
785
if (infra_clk_data -> hws [i ] == ERR_PTR (- EPROBE_DEFER ))
@@ -890,6 +896,8 @@ static int mtk_pericfg_init(struct platform_device *pdev)
890
896
return PTR_ERR (base );
891
897
892
898
clk_data = mtk_alloc_clk_data (CLK_PERI_NR );
899
+ if (!clk_data )
900
+ return - ENOMEM ;
893
901
894
902
mtk_clk_register_gates (& pdev -> dev , node , peri_clks ,
895
903
ARRAY_SIZE (peri_clks ), clk_data );
You can’t perform that action at this time.
0 commit comments