aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2016-08-25 17:19:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-31 07:05:43 -0400
commit1d37ae50671435e842c58b1429dfb0a6d065c42a (patch)
tree60091cd22e27072ebf8e3ef707674b85cc87799f /drivers/hwtracing
parent57a3668bebfd6247dceb862fceaee3b1fa2219b7 (diff)
coresight: tmc: Delete an unnecessary check before the function call "kfree"
The kfree() 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. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing')
-rw-r--r--drivers/hwtracing/coresight/coresight-tmc-etf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c
index e68289b8c072..5fa49c4252f6 100644
--- a/drivers/hwtracing/coresight/coresight-tmc-etf.c
+++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c
@@ -168,7 +168,7 @@ out:
168 spin_unlock_irqrestore(&drvdata->spinlock, flags); 168 spin_unlock_irqrestore(&drvdata->spinlock, flags);
169 169
170 /* Free memory outside the spinlock if need be */ 170 /* Free memory outside the spinlock if need be */
171 if (!used && buf) 171 if (!used)
172 kfree(buf); 172 kfree(buf);
173 173
174 if (!ret) 174 if (!ret)