[PATCH 3/5] MIPS: VPE: Delete an error message for a failed memory allocation in vpe_open()

From: SF Markus Elfring
Date: Tue May 23 2017 - 16:54:19 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 May 2017 21:54:42 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
arch/mips/kernel/vpe.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index 544ea21bfef9..721b1523b740 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -799,7 +799,6 @@ static int vpe_open(struct inode *inode, struct file *filp)
- if (!v->pbuffer) {
- pr_warn("VPE loader: unable to allocate memory\n");
+ if (!v->pbuffer)
return -ENOMEM;
- }
+
v->plen = P_SIZE;
v->load_addr = NULL;
v->len = 0;
--
2.13.0