[PATCH] drivers/net/phy/dp83640: remove unneeded val variable
From: cgel . zte
Date: Tue Jan 18 2022 - 02:54:48 EST
From: Minghao Chi <chi.minghao@xxxxxxxxxx>
Return value from phy_read() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: Minghao Chi <chi.minghao@xxxxxxxxxx>
Signed-off-by: CGEL ZTE <cgel.zte@xxxxxxxxx>
---
drivers/net/phy/dp83640.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index c2d1a85ec559..4159e7cdc92c 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -226,15 +226,13 @@ static inline int broadcast_write(struct phy_device *phydev, u32 regnum,
static int ext_read(struct phy_device *phydev, int page, u32 regnum)
{
struct dp83640_private *dp83640 = phydev->priv;
- int val;
if (dp83640->clock->page != page) {
broadcast_write(phydev, PAGESEL, page);
dp83640->clock->page = page;
}
- val = phy_read(phydev, regnum);
- return val;
+ return phy_read(phydev, regnum);
}
/* Caller must hold extreg_lock. */
--
2.25.1