mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
cov: fix error path
Avoid calling 'bad:' section since we have not set 'fd' yet and instead directly return failing 0 value.
This commit is contained in:
parent
13c49033ed
commit
253989ecd9
@ -102,7 +102,7 @@ static int _sysfs_get_kvdo_value(const char *dm_name, const char *vdo_param, uin
|
||||
if (dm_snprintf(path, sizeof(path), "%skvdo/%s/%s",
|
||||
dm_sysfs_dir(), dm_name, vdo_param) < 0) {
|
||||
log_error("Failed to build kmod path.");
|
||||
goto bad;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((fd = open(path, O_RDONLY)) < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user