Skip to contentSkip to conversation

drivers/virt/fsl_hypervisor: remove an unneeded variable

PATCH New Jason Wang 1 participant 1 message Dec 12, 2021

lore
Share & tools
lore

Jason Wang

author
#0 lore raw

PATCH 1/1 drivers/virt/fsl_hypervisor: remove an unneeded variable

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.

---
 drivers/virt/fsl_hypervisor.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/virt/fsl_hypervisor.c +1 -3
index 46ee0a0998b6..e49bec8bc8a4 100644
@@ -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 = {
Signature · 1 line
2.34.1