mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
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: dfcc496ed7 ("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>
This commit is contained in:
parent
f6ac626c8a
commit
33bab10457
1 changed files with 1 additions and 1 deletions
|
|
@ -232,7 +232,7 @@ static void miiphy_pre(struct bb_miiphy_bus *bus, char read,
|
|||
*/
|
||||
int bb_miiphy_read(struct mii_dev *miidev, int addr, int devad, int reg)
|
||||
{
|
||||
short rdreg; /* register working value */
|
||||
unsigned short rdreg; /* register working value */
|
||||
int v;
|
||||
int j; /* counter */
|
||||
struct bb_miiphy_bus *bus;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue