* [PATCH] drivers/virt/fsl_hypervisor: remove an unneeded variable
@ 2021-12-12 7:40 Jason Wang
0 siblings, 0 replies; only message in thread
From: Jason Wang @ 2021-12-12 7:40 UTC (permalink / raw)
To: wangborong; +Cc: linux-kernel
The variable `ret' used for returning is never changed in function
`fsl_hv_close'. So that it can be removed and just return its
initial value 0 at the end of `fsl_hv_close' function.
Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
---
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 46ee0a0998b6..e49bec8bc8a4 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -687,15 +687,13 @@ static int fsl_hv_close(struct inode *inode, struct file *filp)
struct doorbell_queue *dbq = filp->private_data;
unsigned long flags;
- int ret = 0;
-
spin_lock_irqsave(&db_list_lock, flags);
list_del(&dbq->list);
spin_unlock_irqrestore(&db_list_lock, flags);
kfree(dbq);
- return ret;
+ return 0;
}
static const struct file_operations fsl_hv_fops = {
--
2.34.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-12 7:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-12 7:40 [PATCH] drivers/virt/fsl_hypervisor: remove an unneeded variable Jason Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®