Skip to content

Commit

Permalink
ata: remove unnecessary code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Dietsche authored and Jeff Garzik committed Jul 23, 2011
1 parent d4d8eaf commit 47db477
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/ata/pata_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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 = {
Expand Down

0 comments on commit 47db477

Please sign in to comment.