From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
To: davem@davemloft.net
Cc: Dean Nelson <dnelson@redhat.com>,
netdev@vger.kernel.org, gospo@redhat.com, bphilips@novell.com,
stable@kernel.org, Jesse Brandeburg <jesse.brandeburg@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [PATCH 08/27] e1000: fix return value not set on error
Date: Fri, 10 Dec 2010 22:17:02 -0800 [thread overview]
Message-ID: <1292048241-22026-9-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1292048241-22026-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Dean Nelson <dnelson@redhat.com>
Dean noticed that 'err' wasn't being set when the "goto err_dma"
statement is executed in the following hunk from the commit. It's value
will be zero as a result of a successful call to e1000_init_hw_struct().
This patch changes the error condition to be correctly propagated.
CC: stable@kernel.org
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/e1000/e1000_main.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 06c7d1c..491bf2a 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -971,11 +971,13 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
*/
dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
pci_using_dac = 1;
- } else if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
- dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
} else {
- pr_err("No usable DMA config, aborting\n");
- goto err_dma;
+ err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
+ if (err) {
+ pr_err("No usable DMA config, aborting\n");
+ goto err_dma;
+ }
+ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
}
netdev->netdev_ops = &e1000_netdev_ops;
--
1.7.3.2
next prev parent reply other threads:[~2010-12-11 6:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-11 6:16 [net-next 00/27][pull-request] Intel Wired LAN Driver Updates Jeff Kirsher
2010-12-11 6:16 ` [PATCH 01/27] Documentation/networking/e1000.txt: Update documentation Jeff Kirsher
2010-12-11 6:16 ` [PATCH 02/27] Documentation/networking/e1000e.txt: " Jeff Kirsher
2010-12-11 6:16 ` [PATCH 03/27] Documentation/networking/igb.txt: update documentation Jeff Kirsher
2010-12-11 6:16 ` [PATCH 04/27] Documentation/networking/igbvf.txt: Update documentation Jeff Kirsher
2010-12-11 6:34 ` Ben Hutchings
[not found] ` <AANLkTikUqZsaSg-q+GJvRrUb4C8rFZSbBta0tyeh==Ay@mail.gmail.com>
2010-12-11 19:44 ` David Miller
2010-12-11 6:16 ` [PATCH 05/27] Documentation/networking/ixgbe.txt: Update ixgbe documentation Jeff Kirsher
2010-12-11 6:17 ` [PATCH 06/27] Documentation/networking/ixgbevf.txt: Update documentation Jeff Kirsher
2010-12-11 6:17 ` [PATCH 07/27] MAINTAINERS: Update Intel Wired LAN info Jeff Kirsher
2010-12-11 6:17 ` [PATCH 08/27] e1000: fix return value not set on error Jeff Kirsher
2010-12-11 6:17 ` Jeff Kirsher [this message]
2010-12-11 6:17 ` [PATCH 09/27] Intel Wired LAN drivers: Use static const Jeff Kirsher
2010-12-11 6:17 ` [PATCH 10/27] ixgb: Don't check for vlan group on transmit Jeff Kirsher
2010-12-13 1:00 ` Jesse Gross
2010-12-13 18:43 ` Tantilov, Emil S
2010-12-14 3:40 ` Jesse Gross
2010-12-14 18:00 ` Tantilov, Emil S
2010-12-11 19:44 ` [net-next 00/27][pull-request] Intel Wired LAN Driver Updates David Miller
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=1292048241-22026-9-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=bphilips@novell.com \
--cc=davem@davemloft.net \
--cc=dnelson@redhat.com \
--cc=gospo@redhat.com \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
--cc=stable@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).