mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
dm ioctl: remove double parentheses
commit e36215d87f upstream.
The extra pair of parantheses is not needed and causes clang to generate
warnings about the DM_DEV_CREATE_CMD comparison in validate_params().
Also remove another double parentheses that doesn't cause a warning.
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
01f4db3cd8
commit
617f8bd7ec
|
|
@ -1773,12 +1773,12 @@ static int validate_params(uint cmd, struct dm_ioctl *param)
|
|||
cmd == DM_LIST_VERSIONS_CMD)
|
||||
return 0;
|
||||
|
||||
if ((cmd == DM_DEV_CREATE_CMD)) {
|
||||
if (cmd == DM_DEV_CREATE_CMD) {
|
||||
if (!*param->name) {
|
||||
DMWARN("name not supplied when creating device");
|
||||
return -EINVAL;
|
||||
}
|
||||
} else if ((*param->uuid && *param->name)) {
|
||||
} else if (*param->uuid && *param->name) {
|
||||
DMWARN("only supply one of name or uuid, cmd(%u)", cmd);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user