clk: initialize clk->data when using default xlate
Right now when using clk_of_xlate_default(), clk->data remains un-initialized because clk_get_bulk() does not initialize memory on allocation of clock structure. This can cause problems when data is used to match if two clocks pointers are exactly the same underlying clocks, for example. Fix it by initializing clk->data to 0. Suggested-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
This commit is contained in:
parent
c026231e15
commit
e497fabb91
@ -51,6 +51,8 @@ static int clk_of_xlate_default(struct clk *clk,
|
||||
else
|
||||
clk->id = 0;
|
||||
|
||||
clk->data = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user