aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r--drivers/ieee1394/sbp2.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 47dbe8f17e8..a81ba8fca0d 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -513,9 +513,9 @@ static int sbp2util_create_command_orb_pool(struct sbp2_lu *lu)
513 return 0; 513 return 0;
514} 514}
515 515
516static void sbp2util_remove_command_orb_pool(struct sbp2_lu *lu) 516static void sbp2util_remove_command_orb_pool(struct sbp2_lu *lu,
517 struct hpsb_host *host)
517{ 518{
518 struct hpsb_host *host = lu->hi->host;
519 struct list_head *lh, *next; 519 struct list_head *lh, *next;
520 struct sbp2_command_info *cmd; 520 struct sbp2_command_info *cmd;
521 unsigned long flags; 521 unsigned long flags;
@@ -922,15 +922,16 @@ static void sbp2_remove_device(struct sbp2_lu *lu)
922 922
923 if (!lu) 923 if (!lu)
924 return; 924 return;
925
926 hi = lu->hi; 925 hi = lu->hi;
926 if (!hi)
927 goto no_hi;
927 928
928 if (lu->shost) { 929 if (lu->shost) {
929 scsi_remove_host(lu->shost); 930 scsi_remove_host(lu->shost);
930 scsi_host_put(lu->shost); 931 scsi_host_put(lu->shost);
931 } 932 }
932 flush_scheduled_work(); 933 flush_scheduled_work();
933 sbp2util_remove_command_orb_pool(lu); 934 sbp2util_remove_command_orb_pool(lu, hi->host);
934 935
935 list_del(&lu->lu_list); 936 list_del(&lu->lu_list);
936 937
@@ -971,9 +972,8 @@ static void sbp2_remove_device(struct sbp2_lu *lu)
971 972
972 lu->ud->device.driver_data = NULL; 973 lu->ud->device.driver_data = NULL;
973 974
974 if (hi) 975 module_put(hi->host->driver->owner);
975 module_put(hi->host->driver->owner); 976no_hi:
976
977 kfree(lu); 977 kfree(lu);
978} 978}
979 979