OSDN Git Service

net: stmmac: dwmac-sun8i: Variable "val" in function sun8i_dwmac_set_syscon() could...
authorYizhuo <yzhai003@ucr.edu>
Sat, 31 Aug 2019 02:00:48 +0000 (19:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Sep 2019 18:48:15 +0000 (11:48 -0700)
commite33b4325e60e146c2317a8b548cbd633239ff83b
treedb7b83e44072b6dcea346765c2a5ecd541a63516
parent089cf7f6ecb266b6a4164919a2e69bd2f938374a
net: stmmac: dwmac-sun8i: Variable "val" in function sun8i_dwmac_set_syscon() could be uninitialized

In function sun8i_dwmac_set_syscon(), local variable "val" could
be uninitialized if function regmap_field_read() returns -EINVAL.
However, it will be used directly in the if statement, which
is potentially unsafe.

Signed-off-by: Yizhuo <yzhai003@ucr.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c