Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89776
b: refs/heads/master
c: c3ff1b9
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Apr 18, 2008
1 parent c205206 commit 300e2da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: d45ac4fa8f277e1ec5acfb67ce5d6406555760cf
refs/heads/master: c3ff1b90d8924dd1c55c3b56a79bfc563ace4a42
9 changes: 7 additions & 2 deletions trunk/block/bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,16 +740,21 @@ static struct bsg_device *bsg_add_device(struct inode *inode,
struct file *file)
{
struct bsg_device *bd;
int ret;
#ifdef BSG_DEBUG
unsigned char buf[32];
#endif
ret = blk_get_queue(rq);
if (ret)
return ERR_PTR(-ENXIO);

bd = bsg_alloc_device();
if (!bd)
if (!bd) {
blk_put_queue(rq);
return ERR_PTR(-ENOMEM);
}

bd->queue = rq;
kobject_get(&rq->kobj);
bsg_set_block(bd, file);

atomic_set(&bd->ref_count, 1);
Expand Down

0 comments on commit 300e2da

Please sign in to comment.