aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 15:32:42 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 15:32:42 -0400
commit467a3ca5cab64a16b5ec46ebb1895c84c280dcfe (patch)
tree68096d5b17e884d270420d50e466186c73019830 /drivers/block/loop.c
parent40c9f61eae9098212b6906f29f30f08f7a19b5e2 (diff)
parent84a1caf1453c3d44050bd22db958af4a7f99315c (diff)
Merge branch 'v3.6-rc7' into tty-next
This is to sync up on Linus's branch to get the other tty and core changes. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r--drivers/block/loop.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index bbca966f8f66..3bba65510d23 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1597,14 +1597,12 @@ static int loop_add(struct loop_device **l, int i)
1597 struct gendisk *disk; 1597 struct gendisk *disk;
1598 int err; 1598 int err;
1599 1599
1600 err = -ENOMEM;
1600 lo = kzalloc(sizeof(*lo), GFP_KERNEL); 1601 lo = kzalloc(sizeof(*lo), GFP_KERNEL);
1601 if (!lo) { 1602 if (!lo)
1602 err = -ENOMEM;
1603 goto out; 1603 goto out;
1604 }
1605 1604
1606 err = idr_pre_get(&loop_index_idr, GFP_KERNEL); 1605 if (!idr_pre_get(&loop_index_idr, GFP_KERNEL))
1607 if (err < 0)
1608 goto out_free_dev; 1606 goto out_free_dev;
1609 1607
1610 if (i >= 0) { 1608 if (i >= 0) {