aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 88c77d63c01f..3acb1b692f8c 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1074,23 +1074,7 @@ static int init_irq (ide_hwif_t *hwif)
1074 mutex_unlock(&ide_cfg_mtx); 1074 mutex_unlock(&ide_cfg_mtx);
1075 return 0; 1075 return 0;
1076out_unlink: 1076out_unlink:
1077 spin_lock_irq(&ide_lock); 1077 ide_remove_port_from_hwgroup(hwif);
1078 if (hwif->next == hwif) {
1079 BUG_ON(hwgroup->hwif != hwif);
1080 kfree(hwgroup);
1081 } else {
1082 ide_hwif_t *g;
1083 g = hwgroup->hwif;
1084 while (g->next != hwif)
1085 g = g->next;
1086 g->next = hwif->next;
1087 if (hwgroup->hwif == hwif) {
1088 BUG_ON(hwgroup->drive);
1089 hwgroup->hwif = g;
1090 }
1091 BUG_ON(hwgroup->hwif == hwif);
1092 }
1093 spin_unlock_irq(&ide_lock);
1094out_up: 1078out_up:
1095 mutex_unlock(&ide_cfg_mtx); 1079 mutex_unlock(&ide_cfg_mtx);
1096 return 1; 1080 return 1;