Merge branch 'linus' into next
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / security / tomoyo / mount.c
index 8ba28fda4727140bfec904efdc5d1098b4d2a46b..0bbba8b678216e6266df1b0d425999f8f5331a87 100644 (file)
@@ -125,7 +125,7 @@ static int tomoyo_mount_acl(struct tomoyo_request_info *r, char *dev_name,
        }
        if (need_dev) {
                /* Get mount point or device file. */
-               if (kern_path(dev_name, LOOKUP_FOLLOW, &path)) {
+               if (!dev_name || kern_path(dev_name, LOOKUP_FOLLOW, &path)) {
                        error = -ENOENT;
                        goto out;
                }