mirror of
git://sourceware.org/git/lvm2.git
synced 2025-04-01 18:50:41 +03:00
o Bug fix in error path
This commit is contained in:
parent
885795e67d
commit
89e46d3d83
@ -118,12 +118,9 @@ static struct block_device *dm_get_device(struct block_device *bdev)
|
||||
if (n) {
|
||||
kmem_cache_free(bdev_cachep, n);
|
||||
}
|
||||
if (rv) {
|
||||
d = ERR_PTR(rv);
|
||||
}
|
||||
up(&bdev_sem);
|
||||
|
||||
return d->bdev;
|
||||
return rv ? ERR_PTR(rv) : d->bdev;
|
||||
}
|
||||
|
||||
struct block_device *dm_blkdev_get(const char *path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user