linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Potential uninitialized variables in regulator: ltc3589
@ 2019-10-04  4:59 Yizhuo Zhai
  0 siblings, 0 replies; only message in thread
From: Yizhuo Zhai @ 2019-10-04  4:59 UTC (permalink / raw)
  To: broonie, linux-kernel, Zhiyun Qian, Chengyu Song

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-04  4:59 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:59 Potential uninitialized variables in regulator: ltc3589 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).