aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-02-24 13:00:51 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-04-18 11:55:31 -0400
commit7c1fca336661aaeb70b9094c4b8eaae389027509 (patch)
tree42280426496b607a08d3fa5689a2107bf5f1738b /drivers/firewire
parentbd7dee6311156b7cdf884344feb34628909398ad (diff)
firewire: fw-sbp2: fix reference counting
The reference count of the unit dropped too low in an error path in sbp2_probe. Fixed by moving the _get further up. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jarod Wilson <jwilson@redhat.com>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-sbp2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 62b4e47d0cc0..8fff18e05000 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -1119,6 +1119,7 @@ static int sbp2_probe(struct device *dev)
1119 goto fail_shost_put; 1119 goto fail_shost_put;
1120 1120
1121 fw_device_get(device); 1121 fw_device_get(device);
1122 get_device(&unit->device);
1122 1123
1123 /* Initialize to values that won't match anything in our table. */ 1124 /* Initialize to values that won't match anything in our table. */
1124 firmware_revision = 0xff000000; 1125 firmware_revision = 0xff000000;
@@ -1134,8 +1135,6 @@ static int sbp2_probe(struct device *dev)
1134 1135
1135 sbp2_init_workarounds(tgt, model, firmware_revision); 1136 sbp2_init_workarounds(tgt, model, firmware_revision);
1136 1137
1137 get_device(&unit->device);
1138
1139 /* Do the login in a workqueue so we can easily reschedule retries. */ 1138 /* Do the login in a workqueue so we can easily reschedule retries. */
1140 list_for_each_entry(lu, &tgt->lu_list, link) 1139 list_for_each_entry(lu, &tgt->lu_list, link)
1141 sbp2_queue_work(lu, 0); 1140 sbp2_queue_work(lu, 0);