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

Commit e2c9bd82 authored by Julia Lawall's avatar Julia Lawall Committed by Nikhilesh Reddy
Browse files

UBI: drop null test before destroy functions

Remove unneeded NULL test.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/

)

// <smpl>
@@ expression x; @@
-if (x != NULL)
  \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x);
// </smpl>

CRs-Fixed: 975289
Change-Id: I6a10dba4c17e8d9983b8dee633ba6c7b2785f7c6
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Git-commit: f9a113d65fa56d8e8e662e37ec2fbeac0d52aa01
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarNikhilesh Reddy <reddyn@codeaurora.org>
parent b3762519
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1209,9 +1209,7 @@ static void destroy_ai(struct ubi_attach_info *ai)
		}
	}

	if (ai->aeb_slab_cache)
	kmem_cache_destroy(ai->aeb_slab_cache);

	kfree(ai);
}