lkml.org 
[lkml]   [2019]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectPotential uninitialized variables in regulator: ltc3589
Hi All:

drivers/regulator/ltc3589.c

Variable "irqstat" in function ltc3589_isr() 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 ltc3589_isr() because
the error code is out of the return type: irqreturn_t.

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:59    [W:0.917 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site