aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-sbp2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/fw-sbp2.c')
-rw-r--r--drivers/firewire/fw-sbp2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index a093ac329db7..03069a454c07 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -769,6 +769,7 @@ static void sbp2_release_target(struct kref *kref)
769 struct Scsi_Host *shost = 769 struct Scsi_Host *shost =
770 container_of((void *)tgt, struct Scsi_Host, hostdata[0]); 770 container_of((void *)tgt, struct Scsi_Host, hostdata[0]);
771 struct scsi_device *sdev; 771 struct scsi_device *sdev;
772 struct fw_device *device = fw_device(tgt->unit->device.parent);
772 773
773 /* prevent deadlocks */ 774 /* prevent deadlocks */
774 sbp2_unblock(tgt); 775 sbp2_unblock(tgt);
@@ -791,6 +792,7 @@ static void sbp2_release_target(struct kref *kref)
791 792
792 put_device(&tgt->unit->device); 793 put_device(&tgt->unit->device);
793 scsi_host_put(shost); 794 scsi_host_put(shost);
795 fw_device_put(device);
794} 796}
795 797
796static struct workqueue_struct *sbp2_wq; 798static struct workqueue_struct *sbp2_wq;
@@ -1088,6 +1090,8 @@ static int sbp2_probe(struct device *dev)
1088 if (scsi_add_host(shost, &unit->device) < 0) 1090 if (scsi_add_host(shost, &unit->device) < 0)
1089 goto fail_shost_put; 1091 goto fail_shost_put;
1090 1092
1093 fw_device_get(device);
1094
1091 /* Initialize to values that won't match anything in our table. */ 1095 /* Initialize to values that won't match anything in our table. */
1092 firmware_revision = 0xff000000; 1096 firmware_revision = 0xff000000;
1093 model = 0xff000000; 1097 model = 0xff000000;