mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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>
This commit is contained in:
parent
bd7dee6311
commit
7c1fca3366
1 changed files with 1 additions and 2 deletions
|
@ -1119,6 +1119,7 @@ static int sbp2_probe(struct device *dev)
|
||||||
goto fail_shost_put;
|
goto fail_shost_put;
|
||||||
|
|
||||||
fw_device_get(device);
|
fw_device_get(device);
|
||||||
|
get_device(&unit->device);
|
||||||
|
|
||||||
/* Initialize to values that won't match anything in our table. */
|
/* Initialize to values that won't match anything in our table. */
|
||||||
firmware_revision = 0xff000000;
|
firmware_revision = 0xff000000;
|
||||||
|
@ -1134,8 +1135,6 @@ static int sbp2_probe(struct device *dev)
|
||||||
|
|
||||||
sbp2_init_workarounds(tgt, model, firmware_revision);
|
sbp2_init_workarounds(tgt, model, firmware_revision);
|
||||||
|
|
||||||
get_device(&unit->device);
|
|
||||||
|
|
||||||
/* Do the login in a workqueue so we can easily reschedule retries. */
|
/* Do the login in a workqueue so we can easily reschedule retries. */
|
||||||
list_for_each_entry(lu, &tgt->lu_list, link)
|
list_for_each_entry(lu, &tgt->lu_list, link)
|
||||||
sbp2_queue_work(lu, 0);
|
sbp2_queue_work(lu, 0);
|
||||||
|
|
Loading…
Reference in a new issue