mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
o Bug fix in error path
This commit is contained in:
parent
04c89ae74c
commit
8402493a28
@ -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