Merge tag 'libnvdimm-for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm...
[firefly-linux-kernel-4.4.55.git] / security / integrity / iint.c
index dbb6d141c3db4822fc4e836934bb03ab4da366bf..3d2f5b45c8cbeb0b376749adab00985b7a636f6f 100644 (file)
@@ -213,6 +213,9 @@ int __init integrity_read_file(const char *path, char **data)
        char *buf;
        int rc = -EINVAL;
 
+       if (!path || !*path)
+               return -EINVAL;
+
        file = filp_open(path, O_RDONLY, 0);
        if (IS_ERR(file)) {
                rc = PTR_ERR(file);