From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
To: davem@davemloft.net
Cc: Bruce Allan <bruce.w.allan@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, bphilips@novell.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [PATCH 25/27] e1000e: static analysis tools complain of a possible null ptr p dereference
Date: Fri, 10 Dec 2010 22:20:38 -0800 [thread overview]
Message-ID: <1292048440-22125-2-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1292048440-22125-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Bruce Allan <bruce.w.allan@intel.com>
Adding this default case resolves the issue.
v2- Removed "break" in default case based on feedback
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/e1000e/ethtool.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index 29b09113..a7bec0b 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -1992,6 +1992,9 @@ static void e1000_get_ethtool_stats(struct net_device *netdev,
p = (char *) adapter +
e1000_gstrings_stats[i].stat_offset;
break;
+ default:
+ data[i] = 0;
+ continue;
}
data[i] = (e1000_gstrings_stats[i].sizeof_stat ==
--
1.7.3.2
next prev parent reply other threads:[~2010-12-11 6:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-11 6:20 [PATCH 24/27] e1000e: minor error message corrections Jeff Kirsher
2010-12-11 6:20 ` Jeff Kirsher [this message]
2010-12-11 6:20 ` [PATCH 26/27] e1000e: increment the driver version Jeff Kirsher
2010-12-11 6:20 ` [PATCH 27/27] igb: Add new function to read part number from EEPROM in string format Jeff Kirsher
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=1292048440-22125-2-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=bphilips@novell.com \
--cc=bruce.w.allan@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--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).