Potential uninitialized variables in subsys net: hisilicon

From: Yizhuo Zhai <hidden>
Date: 2019-10-04 03:35:56
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help