summaryrefslogtreecommitdiffstats
path: root/drivers/virt/fsl_hypervisor.c
diff options
context:
space:
mode:
authorHaowen Bai <baihaowen@meizu.com>2022-03-11 03:38:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-18 13:49:00 +0100
commitb734fed013985626b519f0ff1c97a4b5eca31a8d (patch)
treeb841e468af116ba703b01b0532c42f6540ce7d50 /drivers/virt/fsl_hypervisor.c
parentmei: avoid iterator usage outside of list_for_each_entry (diff)
downloadlinux-b734fed013985626b519f0ff1c97a4b5eca31a8d.tar.xz
linux-b734fed013985626b519f0ff1c97a4b5eca31a8d.zip
virt: fsl_hypervisor: Directly return 0 instead of using local ret variable
fixes coccinelle warning: drivers/virt/fsl_hypervisor.c:690:5-8: Unneeded variable: "ret". Return "0" on line 698 Signed-off-by: Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1646966331-16813-1-git-send-email-baihaowen@meizu.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/virt/fsl_hypervisor.c')
-rw-r--r--drivers/virt/fsl_hypervisor.c4
1 files changed, 1 insertions, 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 = {