diff --git a/module/apparmor/main.c b/module/apparmor/main.c index 1f25896ad..5459fdf66 100644 --- a/module/apparmor/main.c +++ b/module/apparmor/main.c @@ -1134,9 +1134,7 @@ int aa_link(struct aaprofile *active, struct dentry *link, if (error_code != 0) { /* inner or outer error */ result = 0; - } else if (match) { - result = 1; - } else { + } else if (!match) { /* failed to match */ WARN_ON(iname); WARN_ON(oname);