Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362479
b: refs/heads/master
c: 2b5bebc
h: refs/heads/master
i:
  362477: fab0c81
  362475: 04c4e23
  362471: 6a609d7
  362463: f8a4c0e
v: v3
  • Loading branch information
Joe Lawrence authored and James Bottomley committed Apr 6, 2013
1 parent d16f300 commit 4b9f2f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95c9f4d4da6c4e445a9dd58c8382356520ea91a0
refs/heads/master: 2b5bebccd282f2527d17ac90cf3ad0d486dd89d8
8 changes: 7 additions & 1 deletion trunk/drivers/scsi/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -4112,6 +4112,10 @@ static int st_probe(struct device *dev)
tpnt->disk = disk;
disk->private_data = &tpnt->driver;
disk->queue = SDp->request_queue;
/* SCSI tape doesn't register this gendisk via add_disk(). Manually
* take queue reference that release_disk() expects. */
if (!blk_get_queue(disk->queue))
goto out_put_disk;
tpnt->driver = &st_template;

tpnt->device = SDp;
Expand Down Expand Up @@ -4185,7 +4189,7 @@ static int st_probe(struct device *dev)
idr_preload_end();
if (error < 0) {
pr_warn("st: idr allocation failed: %d\n", error);
goto out_put_disk;
goto out_put_queue;
}
tpnt->index = error;
sprintf(disk->disk_name, "st%d", tpnt->index);
Expand All @@ -4211,6 +4215,8 @@ static int st_probe(struct device *dev)
spin_lock(&st_index_lock);
idr_remove(&st_index_idr, tpnt->index);
spin_unlock(&st_index_lock);
out_put_queue:
blk_put_queue(disk->queue);
out_put_disk:
put_disk(disk);
kfree(tpnt);
Expand Down

0 comments on commit 4b9f2f0

Please sign in to comment.