linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Potential uninitialized variable "reg" in clk: axi-clkgen
@ 2019-10-10  0:55 Yizhuo Zhai
  2019-11-08 22:28 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Yizhuo Zhai @ 2019-10-10  0:55 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, linux-clk, linux-kernel,
	Zhiyun Qian, Chengyu Song

Hi All:
drivers/clk/clk-axi-clkgen.c:

Inside function axi_clkgen_recalc_rate(), variable "reg" could be
uninitialized if axi_clkgen_mmcm_read() fails. However, "reg" is used
to decide the control flow later in the if statement, which is
potentially unsafe.

The patch for this case is not easy since the error return is not an
acceptable return value for axi_clkgen_recalc_rate().

-- 
Kind Regards,

Yizhuo Zhai

Computer Science, Graduate Student
University of California, Riverside

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-08 22:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10  0:55 Potential uninitialized variable "reg" in clk: axi-clkgen Yizhuo Zhai
2019-11-08 22:28 ` Stephen Boyd

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).