]> git.baikalelectronics.ru Git - uboot.git/commit
net: miiphybb: fix casting error
authorChris Brandt <chris.brandt@renesas.com>
Fri, 3 Nov 2017 13:30:13 +0000 (08:30 -0500)
committerJoe Hershberger <joe.hershberger@ni.com>
Mon, 15 Jan 2018 18:05:17 +0000 (12:05 -0600)
commit9669191a4383e66769a3d1892c114a81b2178c82
treef9ddd9ca62460d8200395d1af2ee19abf4e4edc9
parentaa475be60b288fd752ef4b16846231e5eda7cbaa
net: miiphybb: fix casting error

Since the return value is a signed int, if the leading MSB of rdreg is a 1,
it will get signed extended and will return a negative value which is an
error even though we read the correct value.

Fixes: dfcc496ed7e2 ("net: mii: Changes not made by spatch")
Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Acked-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/phy/miiphybb.c