Skip to contentSkip to conversation

misc: rtsx: Remove unneeded return variable

PATCH New Yang Li 1 participant 1 message Feb 1, 2021 Char and misc drivers

lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 misc: rtsx: Remove unneeded return variable

This patch removes unneeded return variables, using only
'0' instead.
It fixes the following warning detected by coccinelle:
./drivers/misc/cardreader/rtsx_pcr.c:1808:5-8: Unneeded variable: "ret". Return "0" on line 1833.

---
 drivers/misc/cardreader/rtsx_pcr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/misc/cardreader/rtsx_pcr.c +1 -2
index 5a491d2..7dc7780 100644
@@ -1805,7 +1805,6 @@ static int rtsx_pci_runtime_resume(struct device *device)
 	struct pci_dev *pcidev = to_pci_dev(device);
 	struct pcr_handle *handle;
 	struct rtsx_pcr *pcr;
-	int ret = 0;
 
 	handle = pci_get_drvdata(pcidev);
 	pcr = handle->pcr;
@@ -1830,7 +1829,7 @@ static int rtsx_pci_runtime_resume(struct device *device)
 	schedule_delayed_work(&pcr->idle_work, msecs_to_jiffies(200));
 
 	mutex_unlock(&pcr->pcr_mutex);
-	return ret;
+	return 0;
 }
 
 #else /* CONFIG_PM */
Signature · 1 line
1.8.3.1