* re: clk: actions: Don't reference clk_init_data after registration [bug report]
@ 2019-08-16 22:31 Colin Ian King
0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2019-08-16 22:31 UTC (permalink / raw)
To: Stephen Boyd, Manivannan Sadhasivam, Andreas Färber,
Michael Turquette, linux-arm-kernel, linux-clk
Cc: linux-kernel
Hi,
Static analysis with Coverity Scan on linux-next has found an issue with
the following commit:
commit 20cac6d02815edcc0b1c87bc3e8858b3d1fda3fa
Author: Stephen Boyd <sboyd@kernel.org>
Date: Wed Jul 31 12:35:09 2019 -0700
clk: actions: Don't reference clk_init_data after registration
The analysis is as follows:
7 int i, ret;
1. var_decl: Declaring variable hw without initializer.
68 struct clk_hw *hw;
69
2. Condition i < hw_clks->num, taking true branch.
70 for (i = 0; i < hw_clks->num; i++) {
CID 85252 (#1 of 1): Uninitialized pointer read (UNINIT)
3. uninit_use: Using uninitialized value hw.
71 const char *name = hw->init->name;
72
73 hw = hw_clks->hws[i];
hw is being dereferenced on line 71 however it is not assigned until
line 73.
Did you instead intent this to be:
const char *name;
hw = hw_clks->hws[i];
name = hw->init->name;
Colin
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-16 22:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 22:31 clk: actions: Don't reference clk_init_data after registration [bug report] Colin Ian King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).