Skip to content

Commit ca70d27

Browse files
kbuild test robotcschaufler
authored andcommitted
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 <[email protected]> Acked-by: Serge Hallyn <[email protected]> Acked-by: Casey Schaufler <[email protected]>
1 parent 3bf2789 commit ca70d27

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

security/smack/smackfs.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,11 +2320,7 @@ static const struct file_operations smk_revoke_subj_ops = {
23202320
*/
23212321
static int smk_init_sysfs(void)
23222322
{
2323-
int err;
2324-
err = sysfs_create_mount_point(fs_kobj, "smackfs");
2325-
if (err)
2326-
return err;
2327-
return 0;
2323+
return sysfs_create_mount_point(fs_kobj, "smackfs");
23282324
}
23292325

23302326
/**

0 commit comments

Comments
 (0)