From: Markus Elfring Date: Sun, 16 Nov 2014 13:46:28 +0000 (+0100) Subject: tracing: Deletion of an unnecessary check before iput() X-Git-Tag: MMI-PSA29.97-13-9~10970^2~23 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=16a8ef2751801346f1f76a18685b2beb63cd170f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git tracing: Deletion of an unnecessary check before iput() The iput() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Link: http://lkml.kernel.org/r/5468F875.7080907@users.sourceforge.net Signed-off-by: Markus Elfring Signed-off-by: Steven Rostedt --- diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index fd76f8e108ef..8520acc34b18 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c @@ -552,8 +552,7 @@ error: return ret; fail_address_parse: - if (inode) - iput(inode); + iput(inode); pr_info("Failed to parse address or file.\n");