Skip to contentSkip to conversation

ARM: vexpress/spc: Delete an error message for a failed memory allocation in two functions

PATCH In review SF Markus Elfring 3 participants 4 messages Oct 3, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: vexpress/spc: Delete an error message for a failed memory allocation in two functions

From: Markus Elfring <[email protected]>
Date: Tue, 3 Oct 2017 10:30:07 +0200

Omit extra messages for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

---
 arch/arm/mach-vexpress/spc.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
arch/arm/mach-vexpress/spc.c +2 -6
index fe488523694c..21c064267af5 100644
@@ -451,10 +451,8 @@ int __init ve_spc_init(void __iomem *baseaddr, u32 a15_clusid, int irq)
 {
 	int ret;
 	info = kzalloc(sizeof(*info), GFP_KERNEL);
-	if (!info) {
-		pr_err(SPCLOG "unable to allocate mem\n");
+	if (!info)
 		return -ENOMEM;
-	}
 
 	info->baseaddr = baseaddr;
 	info->a15_clusid = a15_clusid;
@@ -535,10 +533,8 @@ static struct clk *ve_spc_clk_register(struct device *cpu_dev)
 	struct clk_spc *spc;
 
 	spc = kzalloc(sizeof(*spc), GFP_KERNEL);
-	if (!spc) {
-		pr_err("could not allocate spc clk\n");
+	if (!spc)
 		return ERR_PTR(-ENOMEM);
-	}
 
 	spc->hw.init = &init;
 	spc->cluster = topology_physical_package_id(cpu_dev->id);
Signature · 1 line
2.14.2
Acked-by on v1 1/1
#1 lore raw

Hi,

I am not sure if such trivial patches get merged by someone via kernel-janitors list with just maintainers ack or not. Please let me know if you want me to pickup this, for now I am just Ack-ing.

Quoted 7 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Tue, 3 Oct 2017 10:30:07 +0200

Omit extra messages for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signature · 2 lines
Regards,
Sudeep
#2 lore raw
Quoted 5 lines · Sudeep Holla

Hi,

I am not sure if such trivial patches get merged by someone via kernel-janitors list with just maintainers ack or not. Please let me know if you want me to pickup this, for now I am just Ack-ing.

No. kernel-janitors doesn't pick up patches.

regards,
dan carpenter

#3 lore raw
Quoted 9 lines · Dan Carpenter
Quoted 5 lines · Sudeep Holla

Hi,

I am not sure if such trivial patches get merged by someone via kernel-janitors list with just maintainers ack or not. Please let me know if you want me to pickup this, for now I am just Ack-ing.

No. kernel-janitors doesn't pick up patches.

Thanks for the quick response. I will pick this up then.

Signature · 2 lines
Regards,
Sudeep