hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/mmc/host/toshsd.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Toshiba PCI Secure Digital Host Controller Interface driver
34 *
....@@ -6,11 +7,6 @@
67 *
78 * Based on asic3_mmc.c, copyright (c) 2005 SDG Systems, LLC and,
89 * sdhci.c, copyright (C) 2005-2006 Pierre Ossman
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License as published by
12
- * the Free Software Foundation; either version 2 of the License, or (at
13
- * your option) any later version.
1410 */
1511
1612 #include <linux/delay.h>
....@@ -655,7 +651,9 @@
655651 if (ret)
656652 goto unmap;
657653
658
- mmc_add_host(mmc);
654
+ ret = mmc_add_host(mmc);
655
+ if (ret)
656
+ goto free_irq;
659657
660658 base = pci_resource_start(pdev, 0);
661659 dev_dbg(&pdev->dev, "MMIO %pa, IRQ %d\n", &base, pdev->irq);
....@@ -664,6 +662,8 @@
664662
665663 return 0;
666664
665
+free_irq:
666
+ free_irq(pdev->irq, host);
667667 unmap:
668668 pci_iounmap(pdev, host->ioaddr);
669669 release: