From: kbuild test robot Date: Tue, 23 Jun 2015 23:41:07 +0000 (+0800) Subject: sysfs: fix simple_return.cocci warnings X-Git-Tag: firefly_0821_release~176^2~1119^2~5^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ca70d27e445fe721587598030b97357b35f61913;p=firefly-linux-kernel-4.4.55.git sysfs: fix simple_return.cocci warnings security/smack/smackfs.c:2251:1-4: WARNING: end returns can be simpified and declaration on line 2250 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci Signed-off-by: Fengguang Wu Acked-by: Serge Hallyn Acked-by: Casey Schaufler --- diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 2716d02119f3..81a2888a9908 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c @@ -2320,11 +2320,7 @@ static const struct file_operations smk_revoke_subj_ops = { */ static int smk_init_sysfs(void) { - int err; - err = sysfs_create_mount_point(fs_kobj, "smackfs"); - if (err) - return err; - return 0; + return sysfs_create_mount_point(fs_kobj, "smackfs"); } /**