coresight: tmc: Delete an unnecessary check before the function call "kfree"
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 23 Jul 2016 18:04:09 +0000 (20:04 +0200)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 6 Sep 2016 14:24:32 +0000 (08:24 -0600)
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>
drivers/hwtracing/coresight/coresight-tmc-etf.c

index e68289b8c0721c721a44851d072b7eccde17de81..5fa49c4252f648f49a65959827a4e9f165eac9c2 100644 (file)
@@ -168,7 +168,7 @@ out:
        spin_unlock_irqrestore(&drvdata->spinlock, flags);
 
        /* Free memory outside the spinlock if need be */
-       if (!used && buf)
+       if (!used)
                kfree(buf);
 
        if (!ret)
This page took 0.025831 seconds and 5 git commands to generate.