linux/export.h is not needed since the file has no EXPORT_SYMBOL() usage. Also return the result of securityfs_create_file() directly instead of storing it in a temporary dentry. Signed-off-by: Cai Xinchen --- security/lockdown/lockdown.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/security/lockdown/lockdown.c b/security/lockdown/lockdown.c index b6f99b9179b9..08a30cd471e0 100644 --- a/security/lockdown/lockdown.c +++ b/security/lockdown/lockdown.c @@ -11,7 +11,6 @@ */ #include -#include #include #include @@ -158,11 +157,8 @@ static const struct file_operations lockdown_ops = { static int __init lockdown_secfs_init(void) { - struct dentry *dentry; - - dentry = securityfs_create_file("lockdown", 0644, NULL, NULL, - &lockdown_ops); - return PTR_ERR_OR_ZERO(dentry); + return PTR_ERR_OR_ZERO(securityfs_create_file("lockdown", 0644, NULL, + NULL, &lockdown_ops)); } #ifdef CONFIG_SECURITY_LOCKDOWN_LSM_EARLY -- 2.18.0.huawei.25