mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <linux@rempel-privat.de>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <linux@rempel-privat.de>
Subject: [PATCH] net: phy: ar8327: fix ar8327n_reg_read
Date: Tue, 30 Jan 2018 21:02:21 +0100	[thread overview]
Message-ID: <20180130200221.12785-1-linux@rempel-privat.de> (raw)

Actual read value was lost and only by accident worked properly.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 drivers/net/phy/ar8327.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/ar8327.c b/drivers/net/phy/ar8327.c
index a0b10021d..e9ac3d49e 100644
--- a/drivers/net/phy/ar8327.c
+++ b/drivers/net/phy/ar8327.c
@@ -83,7 +83,7 @@ static u32 ar8327n_reg_read(struct phy_device *phydev, u32 reg_addr)
 	reg_word_addr++;
 	phy_addr = 0x10 | ((reg_word_addr >> 5) & 0x7); /* bit7-5 of reg address */
 	phy_reg = (u8) (reg_word_addr & 0x1f);   /* bit4-0 of reg address */
-	reg_val = (u32) mdiobus_read(phydev->bus, phy_addr, phy_reg);
+	tmp_val = (u32) mdiobus_read(phydev->bus, phy_addr, phy_reg);
 	reg_val |= (tmp_val << 16);
 
 	return reg_val;
-- 
2.14.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2018-01-30 20:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 20:02 Oleksij Rempel [this message]
2018-02-05  7:24 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180130200221.12785-1-linux@rempel-privat.de \
    --to=linux@rempel-privat.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox