summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib
diff options
context:
space:
mode:
authorMarkus Elfring2015-02-03 13:55:53 +0100
committerMichael Ellerman2015-03-16 08:50:14 +0100
commit7f4eec395351ef25166276ad9dc3390b83ab41b6 (patch)
tree9c56c2acc95efa338ced09b2bdefd0ac9d194e2f /arch/powerpc/lib
parentpowerpc/powernv: only call OPAL_RESEND_DUMP if firmware supports it (diff)
downloadkernel-qcow2-linux-7f4eec395351ef25166276ad9dc3390b83ab41b6.tar.gz
kernel-qcow2-linux-7f4eec395351ef25166276ad9dc3390b83ab41b6.tar.xz
kernel-qcow2-linux-7f4eec395351ef25166276ad9dc3390b83ab41b6.zip
powerpc: Delete unnecessary checks before 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: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r--arch/powerpc/lib/rheap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c
index a1060a868e69..69abf844c2c3 100644
--- a/arch/powerpc/lib/rheap.c
+++ b/arch/powerpc/lib/rheap.c
@@ -284,7 +284,7 @@ EXPORT_SYMBOL_GPL(rh_create);
*/
void rh_destroy(rh_info_t * info)
{
- if ((info->flags & RHIF_STATIC_BLOCK) == 0 && info->block != NULL)
+ if ((info->flags & RHIF_STATIC_BLOCK) == 0)
kfree(info->block);
if ((info->flags & RHIF_STATIC_INFO) == 0)