netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Potential uninitialized variables in subsys net: hisilicon
@ 2019-10-04  3:35 Yizhuo Zhai
  0 siblings, 0 replies; only message in thread
From: Yizhuo Zhai @ 2019-10-04  3:35 UTC (permalink / raw)
  To: Yisen Zhuang, Salil Mehta, David S. Miller, netdev, linux-kernel,
	Zhiyun Qian, Chengyu Song

Hi All:

drivers/net/ethernet/hisilicon/hip04_eth.c:

In function hip04_reset_ppe(), variable "val" could be uninitialized
if regmap_read() returns -EINVAL. However, "val" is used to decide
the control flow, which is potentially unsafe.

Also, we cannot simply return -EINVAL in hip04_reset_ppe() 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

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

only message in thread, other threads:[~2019-10-04  3:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-04  3:35 Potential uninitialized variables in subsys net: hisilicon 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).