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


Groups > linux.kernel > #1363226 > unrolled thread

[PATCH] sdcardfs: fix itnull.cocci warnings

Started byJulia Lawall <julia.lawall@lip6.fr>
First post2016-03-23 08:30 +0100
Last post2016-03-23 08:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] sdcardfs: fix itnull.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2016-03-23 08:30 +0100

#1363226 — [PATCH] sdcardfs: fix itnull.cocci warnings

FromJulia Lawall <julia.lawall@lip6.fr>
Date2016-03-23 08:30 +0100
Subject[PATCH] sdcardfs: fix itnull.cocci warnings
Message-ID<rfLoS-8wv-11@gated-at.bofh.it>
Remove NULL test, as the index variable of list_for-each_entry cannot be 
NULL.

Generated by: scripts/coccinelle/iterators/itnull.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

 derived_perm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/sdcardfs/derived_perm.c
+++ b/fs/sdcardfs/derived_perm.c
@@ -112,7 +112,7 @@ void get_derived_permission(struct dentr
 void get_derive_permissions_recursive(struct dentry *parent) {
 	struct dentry *dentry;
 	list_for_each_entry(dentry, &parent->d_subdirs, d_child) {
-		if (dentry && dentry->d_inode) {
+		if (dentry->d_inode) {
 			mutex_lock(&dentry->d_inode->i_mutex);
 			get_derived_permission(parent, dentry);
 			fix_derived_permission(dentry->d_inode);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web