1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

coverity: check return value of dev_close in dev_get_block_size()

This commit is contained in:
Peter Rajnoha 2014-01-22 16:20:09 +01:00
parent 34e6d59bba
commit cb595a5a13

View File

@ -178,8 +178,8 @@ int dev_get_block_size(struct device *dev, unsigned int *physical_block_size, un
*physical_block_size = (unsigned int) dev->phys_block_size;
*block_size = (unsigned int) dev->block_size;
out:
if (needs_open)
dev_close(dev);
if (needs_open && !dev_close(dev))
stack;
return r;
}