lkml.org 
[lkml]   [2017]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2/5] fsl_hypervisor: Delete an error message for a failed memory allocation in fsl_hv_open()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 20 May 2017 19:57:52 +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@users.sourceforge.net>
---
drivers/virt/fsl_hypervisor.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
index d1df6c6740f1..40c5eb64f39b 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -663,7 +663,5 @@ static int fsl_hv_open(struct inode *inode, struct file *filp)
- if (!dbq) {
- pr_err("fsl-hv: out of memory\n");
+ if (!dbq)
return -ENOMEM;
- }

spin_lock_init(&dbq->lock);
init_waitqueue_head(&dbq->wait);
--
2.13.0
\
 
 \ /
  Last update: 2017-05-20 21:13    [W:1.477 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site