2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 21:54:06 +08:00

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>
This commit is contained in:
Haowen Bai 2022-03-11 10:38:51 +08:00 committed by Greg Kroah-Hartman
parent c10187b1c5
commit b734fed013

View File

@ -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 = {