Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1170996 > unrolled thread

[PATCH] sysfs: fix simple_return.cocci warnings

Started bykbuild test robot <fengguang.wu@intel.com>
First post2015-06-24 01:50 +0200
Last post2015-06-24 01:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] sysfs: fix simple_return.cocci warnings kbuild test robot <fengguang.wu@intel.com> - 2015-06-24 01:50 +0200

#1170996 — [PATCH] sysfs: fix simple_return.cocci warnings

Fromkbuild test robot <fengguang.wu@intel.com>
Date2015-06-24 01:50 +0200
Subject[PATCH] sysfs: fix simple_return.cocci warnings
Message-ID<pEG6Z-10m-1@gated-at.bofh.it>
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>
---

 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");
 }
 
 /**
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web