lkml.org 
[lkml]   [2015]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sysfs: fix simple_return.cocci warnings
On Wed, Jun 24, 2015 at 07:41:07AM +0800, kbuild test robot wrote:
> 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 <fengguang.wu@intel.com>

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>

> ---
>
> smackfs.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> --- a/security/smack/smackfs.c
> +++ b/security/smack/smackfs.c
> @@ -2247,11 +2247,7 @@ static const struct file_operations smk_
> */
> 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");
> }
>
> /**


\
 
 \ /
  Last update: 2015-06-25 15:21    [W:0.043 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site