ata: remove unnecessary code
authorGreg Dietsche <Gregory.Dietsche@cuw.edu>
Thu, 16 Jun 2011 16:39:21 +0000 (11:39 -0500)
committerJeff Garzik <jgarzik@pobox.com>
Sat, 23 Jul 2011 22:07:27 +0000 (18:07 -0400)
Compile tested.
remove unnecessary code that matches this coccinelle pattern
if (...)
return ret;
return ret;

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/ata/pata_acpi.c

index 91949d997555bcab74b4d197859f70dc9d6909b0..54145edf50e85ad1f3bf1224df03c2aed6653139 100644 (file)
@@ -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 = {