]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: mtk_eth_soc: fix error checking in mtk_mac_config()
authorTom Rix <trix@redhat.com>
Sat, 15 Jan 2022 17:49:18 +0000 (09:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Jan 2022 22:33:17 +0000 (22:33 +0000)
commit2f405c8979ccd14af932f28584984e5b0c3bcb70
treeb673945c3500d3657d349d6a607345a2febb66dc
parent09e466d82949ed24594336cba2d3e48ad0cc420b
net: ethernet: mtk_eth_soc: fix error checking in mtk_mac_config()

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: b9c79679ae8c ("net: ethernet: mediatek: Re-add support SGMII")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c