Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1646192
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/5] fsl_hypervisor: Return the success indication only as a constant in fsl_hv_open() |
| Date | 2017-05-20 21:20 +0200 |
| Message-ID | <tJi4V-5vp-3@gated-at.bofh.it> (permalink) |
| References | <tJhVf-5rT-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 20 May 2017 20:05:19 +0200
* Return a success code without storing it in an intermediate variable.
* Delete the local variable "ret" which became unnecessary with
this refactoring.
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 40c5eb64f39b..9e881dc29c6b 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -657,7 +657,6 @@ static int fsl_hv_open(struct inode *inode, struct file *filp)
{
struct doorbell_queue *dbq;
unsigned long flags;
- int ret = 0;
dbq = kzalloc(sizeof(*dbq), GFP_KERNEL);
if (!dbq)
@@ -671,8 +670,7 @@ static int fsl_hv_open(struct inode *inode, struct file *filp)
spin_unlock_irqrestore(&db_list_lock, flags);
filp->private_data = dbq;
-
- return ret;
+ return 0;
}
/*
--
2.13.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] fsl_hypervisor: Adjustments for two function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-20 21:10 +0200 [PATCH 3/5] fsl_hypervisor: Return the success indication only as a constant in fsl_hv_open() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-20 21:20 +0200 [PATCH 5/5] fsl_hypervisor: Delete error messages for failed memory allocations in ioctl_memcpy() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-20 21:20 +0200 [PATCH 4/5] fsl_hypervisor: Use kcalloc() in ioctl_memcpy() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-20 21:20 +0200 [PATCH 1/5] fsl_hypervisor: Improve a size determination in fsl_hv_open() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-20 21:20 +0200 [PATCH 2/5] fsl_hypervisor: Delete an error message for a failed memory allocation in fsl_hv_open() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-20 21:20 +0200
csiph-web