linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Andy Fleming <afleming@freescale.com>
To: netdev@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: [PATCH 1/2] Fix error checking in Vitesse IRQ config
Date: Wed, 18 Jul 2007 01:35:50 -0500	[thread overview]
Message-ID: <11847405503115-git-send-email-afleming@freescale.com> (raw)

phy_read() returns a negative number if there's an error, but the
error-checking code in the Vitesse driver's config_intr function
triggers if phy_read() returns non-zero.  Correct that.

Signed-off-by: Andy Fleming <afleming@freescale.com>
---
I made a really stupid mistake in the 4 patches I sent out, earlier.  I
thought those patches had been tested, but they hadn't been.  This one
corrects a tiny error in the patch, and they have now been tested.  As before
this change can be pulled from:

http://opensource.freescale.com/pub/scm/linux-2.6-85xx.git netdev

Really, REALLY sorry about that.  I have been given a paper bag of appropriate
size and shape to fit over my head.

 drivers/net/phy/vitesse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
index 6a53856..8874497 100644
--- a/drivers/net/phy/vitesse.c
+++ b/drivers/net/phy/vitesse.c
@@ -109,7 +109,7 @@ static int vsc824x_config_intr(struct phy_device *phydev)
 		 */
 		err = phy_read(phydev, MII_VSC8244_ISTAT);
 
-		if (err)
+		if (err < 0)
 			return err;
 
 		err = phy_write(phydev, MII_VSC8244_IMASK, 0);
-- 
1.5.0.2.230.gfbe3d-dirty

             reply	other threads:[~2007-07-18  6:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-18  6:35 Andy Fleming [this message]
2007-07-18  7:00 ` [PATCH 1/2] Fix error checking in Vitesse IRQ config pradeep singh
2007-07-18 18:52   ` Andy Fleming
2007-07-19 16:49 ` Jon Loeliger
2007-07-19 19:57 ` Kumar Gala

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=11847405503115-git-send-email-afleming@freescale.com \
    --to=afleming@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).