* Potential uninitialized variables in pwm: stm32-lp
@ 2019-10-04 4:52 Yizhuo Zhai
0 siblings, 0 replies; only message in thread
From: Yizhuo Zhai @ 2019-10-04 4:52 UTC (permalink / raw)
To: Fabrice Gasnier, Thierry Reding, Uwe Kleine-König,
Maxime Coquelin, Alexandre Torgue, linux-pwm, linux-stm32,
linux-arm-kernel, linux-kernel, Zhiyun Qian, Chengyu Song
Hi All:
drivers/pwm/pwm-stm32-lp.c:
Variable "val" and "prd" in function stm32_pwm_lp_get_state() could be
uninitialized
if regmap_read() returns -EINVAL. But it's directly used later without
the return check,
which is potentially unsafe.
Also, we cannot simply return -EINVAL in stm32_pwm_lp_get_state() because the
return type is void.
Thanks for your time to check this case.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-04 4:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-04 4:52 Potential uninitialized variables in pwm: stm32-lp Yizhuo Zhai
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).