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 @@ -1697,6 +1697,10 @@ static int si5341_probe(struct i2c_client *client)
1697
1697
for (i = 0 ; i < data -> num_synth ; ++ i ) {
1698
1698
synth_clock_names [i ] = devm_kasprintf (& client -> dev , GFP_KERNEL ,
1699
1699
"%s.N%u" , client -> dev .of_node -> name , i );
1700
+ if (!synth_clock_names [i ]) {
1701
+ err = - ENOMEM ;
1702
+ goto free_clk_names ;
1703
+ }
1700
1704
init .name = synth_clock_names [i ];
1701
1705
data -> synth [i ].index = i ;
1702
1706
data -> synth [i ].data = data ;
@@ -1715,6 +1719,10 @@ static int si5341_probe(struct i2c_client *client)
1715
1719
for (i = 0 ; i < data -> num_outputs ; ++ i ) {
1716
1720
init .name = kasprintf (GFP_KERNEL , "%s.%d" ,
1717
1721
client -> dev .of_node -> name , i );
1722
+ if (!init .name ) {
1723
+ err = - ENOMEM ;
1724
+ goto free_clk_names ;
1725
+ }
1718
1726
init .flags = config [i ].synth_master ? CLK_SET_RATE_PARENT : 0 ;
1719
1727
data -> clk [i ].index = i ;
1720
1728
data -> clk [i ].data = data ;
You can’t perform that action at this time.
0 commit comments