[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <94b1e14f-47c0-7f13-6158-700488d63c66@users.sourceforge.net>
Date: Tue, 23 May 2017 22:53:19 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-mips@...ux-mips.org, Ingo Molnar <mingo@...nel.org>,
James Hogan <james.hogan@...tec.com>,
Kees Cook <keescook@...omium.org>,
Marcin Nowakowski <marcin.nowakowski@...tec.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Matt Redfearn <matt.redfearn@...tec.com>,
Paul Burton <paul.burton@...tec.com>,
Ralf Bächle <ralf@...ux-mips.org>,
Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 3/5] MIPS: VPE: Delete an error message for a failed memory
allocation in vpe_open()
From: Markus Elfring <elfring@...rs.sourceforge.net>
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@...rs.sourceforge.net>
---
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
Powered by blists - more mailing lists