]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups/cgfsng: remove logically dead code
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 9 Dec 2020 10:48:47 +0000 (11:48 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 10 Dec 2020 19:39:55 +0000 (20:39 +0100)
Fixes: Coverity 1461761
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 862714d87ad5ebb7c6fe10ccb79044d6d181f55b..cade4d3c7f5f98f2f1bbb7df73162ff8ea314f73 100644 (file)
@@ -2749,9 +2749,6 @@ static int device_cgroup_rule_parse_devpath(struct device_item *device,
        if (device_cgroup_parse_access(device, mode) < 0)
                return -1;
 
-       if (n_parts == 1)
-               return ret_set_errno(-1, EINVAL);
-
        ret = stat(path, &sb);
        if (ret < 0)
                return ret_set_errno(-1, errno);