All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jia-Ju Bai <baijiaju1990@163.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	netdev@vger.kernel.org
Cc: jgarzik@pobox.com, shangh@realtek.com.tw, bjj13@mails.tsinghua.edu.cn
Subject: [PATCH v2 1/2] 8139too in linux-3.18.0: Fix the lack of pci_disable_device
Date: Sun, 21 Dec 2014 15:36:43 +0800	[thread overview]
Message-ID: <5496788B.2030105@163.com> (raw)
In-Reply-To: <54958534.7070202@cogentembedded.com>

When pci_request_regions is failed in rtl8139_init_board, 
pci_disable_device is not called to disable the device which are enabled 
by pci_enable_device, because disable_dev_on_err is not assigned 1.
This patch fix this problem.

Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
---
drivers/net/ethernet/realtek/8139too.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/realtek/8139too.c 
b/drivers/net/ethernet/realtek/8139too.c
index 007b38c..49bbcf3 100644
--- a/drivers/net/ethernet/realtek/8139too.c
+++ b/drivers/net/ethernet/realtek/8139too.c
@@ -783,10 +783,10 @@ static struct net_device 
*rtl8139_init_board(struct pci_dev *pdev)
if (rc)
goto err_out;

+ disable_dev_on_err = 1;
rc = pci_request_regions (pdev, DRV_NAME);
if (rc)
goto err_out;
- disable_dev_on_err = 1;

pci_set_master (pdev);

  reply	other threads:[~2014-12-21  7:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-20 14:15 [PATCH] 8139too in linux-3.18.0: some potential bugs Jia-Ju Bai
2014-12-20 14:18 ` Sergei Shtylyov
2014-12-21  7:36   ` Jia-Ju Bai [this message]
2014-12-21 18:15     ` [PATCH v2 1/2] 8139too in linux-3.18.0: Fix the lack of pci_disable_device 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=5496788B.2030105@163.com \
    --to=baijiaju1990@163.com \
    --cc=bjj13@mails.tsinghua.edu.cn \
    --cc=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=shangh@realtek.com.tw \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.