Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a142b26 authored by Dan Williams's avatar Dan Williams Committed by Tejun Heo
Browse files

ahci: cleanup ahci_host_activate_multi_irqs



With devm there is no need to explicitly free irqs on error.

Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 899a63c3
Loading
Loading
Loading
Loading
+3 −18
Original line number Diff line number Diff line
@@ -2496,25 +2496,10 @@ static int ahci_host_activate_multi_irqs(struct ata_host *host, int irq,
					       ahci_port_thread_fn, 0,
					       pp->irq_desc, host->ports[i]);
		if (rc)
			goto out_free_irqs;
	}

	for (i = 0; i < host->n_ports; i++)
		ata_port_desc(host->ports[i], "irq %d", irq + i);

	rc = ata_host_register(host, sht);
	if (rc)
		goto out_free_all_irqs;

	return 0;

out_free_all_irqs:
	i = host->n_ports;
out_free_irqs:
	for (i--; i >= 0; i--)
		devm_free_irq(host->dev, irq + i, host->ports[i]);

			return rc;
		ata_port_desc(host->ports[i], "irq %d", irq + i);
	}
	return ata_host_register(host, sht);
}

/**