From: Mark Einon <mark.einon@gmail.com>
To: gregkh@suse.de
Cc: dan.carpenter@oracle.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, Mark Einon <mark.einon@gmail.com>
Subject: [PATCH 2/4] staging: et131x: Fix et131x smatch issues
Date: Mon, 10 Oct 2011 16:21:12 +0100 [thread overview]
Message-ID: <1318260072-2711-2-git-send-email-mark.einon@gmail.com> (raw)
In-Reply-To: <1318260072-2711-1-git-send-email-mark.einon@gmail.com>
This fixes the following issues:
et131x_initpci.c +488 et131x_adjust_link(45) error: we previously assumed 'phydev' could be null.
et131x_initpci.c +504 et131x_adjust_link(61) warn: variable dereferenced before check 'phydev'
Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
drivers/staging/et131x/et131x_initpci.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c
index 9b2dc55..45ce832 100644
--- a/drivers/staging/et131x/et131x_initpci.c
+++ b/drivers/staging/et131x/et131x_initpci.c
@@ -485,7 +485,7 @@ static void et131x_adjust_link(struct net_device *netdev)
et1310_config_mac_regs2(adapter);
}
- if (phydev->link != adapter->link) {
+ if (phydev && phydev->link != adapter->link) {
/*
* Check to see if we are in coma mode and if
* so, disable it because we will not be able
@@ -501,7 +501,7 @@ static void et131x_adjust_link(struct net_device *netdev)
"Link down - cable problem ?\n");
adapter->boot_coma = 0;
- if (phydev && phydev->speed == SPEED_10) {
+ if (phydev->speed == SPEED_10) {
/* NOTE - Is there a way to query this without
* TruePHY?
* && TRU_QueryCoreType(adapter->hTruePhy, 0) ==
--
1.7.6.4
prev parent reply other threads:[~2011-10-10 15:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 15:21 [PATCH 1/4] staging: et131x: Fix et131x sparse warnings Mark Einon
2011-10-10 15:21 ` Mark Einon [this message]
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=1318260072-2711-2-git-send-email-mark.einon@gmail.com \
--to=mark.einon@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@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
Powered by JetHome