ahci: cleanup ahci_host_activate_multi_irqs
authorDan Williams <dan.j.williams@intel.com>
Fri, 30 Oct 2015 21:09:35 +0000 (17:09 -0400)
committerTejun Heo <tj@kernel.org>
Sat, 31 Oct 2015 01:04:34 +0000 (10:04 +0900)
With devm there is no need to explicitly free irqs on error.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libahci.c

index 67f97e3e471a29dfa1063b66cc69fc4e3ed38d1a..096064cd6c52b1b0f72bf710d1a56893bd6bff9c 100644 (file)
@@ -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++)
+                       return rc;
                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;
+       }
+       return ata_host_register(host, sht);
 }
 
 /**