[lkml]   [2019]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectPotential uninitialized variables in pwm: stm32-lp
Hi All:


Variable "val" and "prd" in function stm32_pwm_lp_get_state() could be
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

 \ /
  Last update: 2019-10-04 06:53    [W:0.031 / U:3.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site