Skip to content
Commit 53de429f authored by Yizhuo's avatar Yizhuo Committed by David S. Miller
Browse files

net: hisilicon: Fix usage of uninitialized variable in function mdio_sc_cfg_reg_write()



In function mdio_sc_cfg_reg_write(), variable "reg_value" could be
uninitialized if regmap_read() fails. However, "reg_value" is used
to decide the control flow later in the if statement, which is
potentially unsafe.

Signed-off-by: default avatarYizhuo <yzhai003@ucr.edu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4fbb97ba
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment