All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ata: remove unnecessary code
@ 2011-06-16 16:39 ` Greg Dietsche
  0 siblings, 0 replies; 14+ messages in thread
From: Greg Dietsche @ 2011-06-16 16:39 UTC (permalink / raw)
  To: jgarzik; +Cc: linux-ide, kernel-janitors, Greg Dietsche

Compile tested.
remove unnecessary code that matches this coccinelle pattern
	if (...)
		return ret;
	return ret;

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
---
 drivers/ata/pata_acpi.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
index 91949d9..54145ed 100644
--- a/drivers/ata/pata_acpi.c
+++ b/drivers/ata/pata_acpi.c
@@ -195,8 +195,6 @@ static int pacpi_port_start(struct ata_port *ap)
 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
 	struct pata_acpi *acpi;
 
-	int ret;
-
 	if (ap->acpi_handle = NULL)
 		return -ENODEV;
 
@@ -205,11 +203,7 @@ static int pacpi_port_start(struct ata_port *ap)
 		return -ENOMEM;
 	acpi->mask[0] = pacpi_discover_modes(ap, &ap->link.device[0]);
 	acpi->mask[1] = pacpi_discover_modes(ap, &ap->link.device[1]);
-	ret = ata_bmdma_port_start(ap);
-	if (ret < 0)
-		return ret;
-
-	return ret;
+	return ata_bmdma_port_start(ap);
 }
 
 static struct scsi_host_template pacpi_sht = {
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-07-20  2:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-16 16:39 [PATCH] ata: remove unnecessary code Greg Dietsche
2011-06-16 16:39 ` Greg Dietsche
2011-07-09 15:21 ` Greg Dietsche
2011-07-09 15:21   ` Greg Dietsche
2011-07-12 14:17 ` Tejun Heo
2011-07-12 14:17   ` Tejun Heo
2011-07-20  2:03 ` Greg Dietsche
2011-07-20  2:03   ` Greg Dietsche
2011-07-20  2:04   ` Greg Dietsche
2011-07-20  2:04     ` Greg Dietsche
2011-07-20  2:10   ` Jeff Garzik
2011-07-20  2:10     ` Jeff Garzik
2011-07-20  2:14     ` Greg Dietsche
2011-07-20  2:14       ` Greg Dietsche

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.