summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/4xx
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-01-11 20:28:54 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2018-12-21 03:32:49 +0300
commita8d5dadae59f5866ac3b68cb993d532c3bf761e4 (patch)
treedad8a7abe44d1ae95668827e4391a94a957bac67 /arch/powerpc/platforms/4xx
parent52930bc6e87191af3894bec302774f334e117f7b (diff)
downloadlinux-a8d5dadae59f5866ac3b68cb993d532c3bf761e4.tar.xz
powerpc/4xx: Delete error message for a ENOMEM in two functions
Omit an extra message for a memory allocation failure in these functions. 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/4xx')
-rw-r--r--arch/powerpc/platforms/4xx/ocm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/4xx/ocm.c b/arch/powerpc/platforms/4xx/ocm.c
index 9bbcfc468a11..3f2118960094 100644
--- a/arch/powerpc/platforms/4xx/ocm.c
+++ b/arch/powerpc/platforms/4xx/ocm.c
@@ -334,7 +334,6 @@ void *ppc4xx_ocm_alloc(phys_addr_t *phys, int size, int align,
ocm_blk = kzalloc(sizeof(*ocm_blk), GFP_KERNEL);
if (!ocm_blk) {
- printk(KERN_ERR "PPC4XX OCM: could not allocate ocm block");
rh_free(ocm_reg->rh, offset);
break;
}
@@ -388,10 +387,8 @@ static int __init ppc4xx_ocm_init(void)
return 0;
ocm_nodes = kzalloc((count * sizeof(struct ocm_info)), GFP_KERNEL);
- if (!ocm_nodes) {
- printk(KERN_ERR "PPC4XX OCM: failed to allocate OCM nodes!\n");
+ if (!ocm_nodes)
return -ENOMEM;
- }
ocm_count = count;
count = 0;