diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-10-03 10:30:07 +0200 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2017-10-03 15:31:31 +0100 |
commit | e8b44f32a959d59eae79c09ef4e410cfef3f59d6 (patch) | |
tree | b52324953ad85158f2524e36c94a51853b8c5eb6 /arch | |
parent | 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff) | |
download | op-kernel-dev-e8b44f32a959d59eae79c09ef4e410cfef3f59d6.zip op-kernel-dev-e8b44f32a959d59eae79c09ef4e410cfef3f59d6.tar.gz |
ARM: vexpress/spc: Delete an error message for a failed memory allocation
Omit extra messages 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: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-vexpress/spc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c index fe48852..21c0642 100644 --- a/arch/arm/mach-vexpress/spc.c +++ b/arch/arm/mach-vexpress/spc.c @@ -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); |