From: "zhao, forrest" <forrest.zhao@intel.com>
To: jgarzik@pobox.com
Cc: linux-ide@vger.kernel.org
Subject: [PATCH] Fix a logic error in ahci_init_one()
Date: Fri, 14 Apr 2006 15:31:21 +0800 [thread overview]
Message-ID: <1144999881.24774.9.camel@localhost.localdomain> (raw)
Fix an bug in error handling, also variable
pci_dev_busy has no use, remove it.
Signed-off-by: Zhao Forrest <forrest.zhao@intel.com>
---
This patch is against libata-dev.git upstream[1]
[1] 26ec634c31a11a003040e10b4d650495158632fd
drivers/scsi/ahci.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 1b8429c..8c4ebba 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -1176,7 +1176,7 @@ static int ahci_init_one (struct pci_dev
unsigned long base;
void __iomem *mmio_base;
unsigned int board_idx = (unsigned int) ent->driver_data;
- int have_msi, pci_dev_busy = 0;
+ int have_msi;
int rc;
VPRINTK("ENTER\n");
@@ -1189,10 +1189,8 @@ static int ahci_init_one (struct pci_dev
return rc;
rc = pci_request_regions(pdev, DRV_NAME);
- if (rc) {
- pci_dev_busy = 1;
+ if (rc)
goto err_out;
- }
if (pci_enable_msi(pdev) == 0)
have_msi = 1;
@@ -1269,8 +1267,7 @@ err_out_msi:
pci_intx(pdev, 0);
pci_release_regions(pdev);
err_out:
- if (!pci_dev_busy)
- pci_disable_device(pdev);
+ pci_disable_device(pdev);
return rc;
}
--
1.2.6
next reply other threads:[~2006-04-14 7:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-14 7:31 zhao, forrest [this message]
2006-04-14 8:47 ` [PATCH] Fix a logic error in ahci_init_one() Jeff Garzik
2006-04-14 9:12 ` zhao, forrest
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=1144999881.24774.9.camel@localhost.localdomain \
--to=forrest.zhao@intel.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@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