]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
dm ioctl: remove double parentheses
authorMatthias Kaehlcke <mka@chromium.org>
Mon, 17 Apr 2017 18:05:03 +0000 (11:05 -0700)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:33:55 +0000 (21:33 -0400)
[ Upstream commit e36215d87f301f9567c8c99fd34e6c3521a94ddf ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/md/dm-ioctl.c

index df060fd016f63aefd4634dc5ad6fb07417cd80c4..e8200892ed411114182a12aa8334d80f1e0e0dc8 100644 (file)
@@ -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;
        }