diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 1e2e28afba45883c43863e57fbd4baeeacee0523..ddd92cec78ed81c44bcfc4d9c530662a179381f2 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -300,7 +300,7 @@ static int may_access_whitelist(struct dev_cgroup *c,
 			continue;
 		if (whitem->minor != ~0 && whitem->minor != refwh->minor)
 			continue;
-		if (refwh->access & (~(whitem->access | ACC_MASK)))
+		if (refwh->access & (~whitem->access))
 			continue;
 		return 1;
 	}