Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8512dd6 authored by Julia Lawall's avatar Julia Lawall Committed by Daniel Rosenberg
Browse files

ANDROID: sdcardfs: fix itnull.cocci warnings



List_for_each_entry has the property that the first argument is always
bound to a real list element, never NULL, so testing dentry is not needed.

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

Cc: Daniel Rosenberg <drosen@google.com>
Signed-off-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarGuenter Roeck <groeck@chromium.org>
parent 6f499f0c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ void get_derived_permission(struct dentry *parent, struct dentry *dentry)
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);