From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Arnd Bergmann <arnd@arndb.de>, Jan Kara <jack@suse.cz>,
Jesper Nilsson <jesper.nilsson@axis.com>,
Kumar Gala <galak@kernel.crashing.org>,
Lorenzo Stoakes <lstoakes@gmail.com>,
Michal Hocko <mhocko@suse.com>, Timur Tabi <timur@freescale.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH 2/5] fsl_hypervisor: Delete an error message for a failed memory allocation in fsl_hv_open()
Date: Sat, 20 May 2017 21:12:23 +0200 [thread overview]
Message-ID: <464d533c-d950-b524-8945-c19647059cba@users.sourceforge.net> (raw)
In-Reply-To: <38a9b933-4cdc-53e7-0a4c-20f96c57648c@users.sourceforge.net>
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
next prev parent reply other threads:[~2017-05-20 19:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-20 19:08 [PATCH 0/5] fsl_hypervisor: Adjustments for two function implementations SF Markus Elfring
2017-05-20 19:10 ` [PATCH 1/5] fsl_hypervisor: Improve a size determination in fsl_hv_open() SF Markus Elfring
2017-05-20 19:12 ` SF Markus Elfring [this message]
2017-05-20 19:13 ` [PATCH 3/5] fsl_hypervisor: Return the success indication only as a constant " SF Markus Elfring
2017-05-20 19:14 ` [PATCH 4/5] fsl_hypervisor: Use kcalloc() in ioctl_memcpy() SF Markus Elfring
2017-05-20 19:16 ` [PATCH 5/5] fsl_hypervisor: Delete error messages for failed memory allocations " SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=464d533c-d950-b524-8945-c19647059cba@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=arnd@arndb.de \
--cc=galak@kernel.crashing.org \
--cc=jack@suse.cz \
--cc=jesper.nilsson@axis.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lstoakes@gmail.com \
--cc=mhocko@suse.com \
--cc=timur@freescale.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome