Skip to content
Commit 843300ae authored by Tom Rix's avatar Tom Rix Committed by Greg Kroah-Hartman
Browse files

net: ethernet: mtk_eth_soc: fix error checking in mtk_mac_config()

commit 214b3369 upstream.

Clang static analysis reports this problem
mtk_eth_soc.c:394:7: warning: Branch condition evaluates
  to a garbage value
                if (err)
                    ^~~

err is not initialized and only conditionally set.
So intitialize err.

Fixes: 7e538372

 ("net: ethernet: mediatek: Re-add support SGMII")
Signed-off-by: default avatarTom Rix <trix@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 09f65e27
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