block: NULL dereference on error path in __blkdev_get()
authorDan Carpenter <error27@gmail.com>
Sat, 19 Mar 2011 12:53:31 +0000 (13:53 +0100)
committerJens Axboe <axboe@carl>
Sat, 19 Mar 2011 12:53:31 +0000 (13:53 +0100)
commit4345caba340f051e10847924fc078ae18ed6695c
treeaada9145e21b79f31129281bf7d1bb33a1710fbb
parent8184f93eced1e304721c2a55c00d87d5a14f8907
block: NULL dereference on error path in __blkdev_get()

"disk" is always NULL when we goto out.  There was a check for this
before, but it was removed in 69e02c59a7d9 "block: Don't check events
while open is in progress".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl>
fs/block_dev.c