summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-02-03 13:55:53 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2015-03-16 08:50:14 +0100
commit7f4eec395351ef25166276ad9dc3390b83ab41b6 (patch)
tree9c56c2acc95efa338ced09b2bdefd0ac9d194e2f /arch/powerpc/platforms/cell
parentpowerpc/powernv: only call OPAL_RESEND_DUMP if firmware supports it (diff)
downloadlinux-7f4eec395351ef25166276ad9dc3390b83ab41b6.tar.xz
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/platforms/cell')
-rw-r--r--arch/powerpc/platforms/cell/celleb_pci.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/cell/celleb_pci.c b/arch/powerpc/platforms/cell/celleb_pci.c
index 3ce70ded2d6a..9b11b5dd8b7c 100644
--- a/arch/powerpc/platforms/cell/celleb_pci.c
+++ b/arch/powerpc/platforms/cell/celleb_pci.c
@@ -393,11 +393,10 @@ static int __init celleb_setup_fake_pci_device(struct device_node *node,
error:
if (mem_init_done) {
- if (config && *config)
+ if (config)
kfree(*config);
- if (res && *res)
+ if (res)
kfree(*res);
-
} else {
if (config && *config) {
size = 256;