misc: rtsx: Remove unneeded return variable
authorYang Li <yang.lee@linux.alibaba.com>
Mon, 1 Feb 2021 07:30:40 +0000 (15:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2021 14:58:14 +0000 (15:58 +0100)
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.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/1612164640-84541-1-git-send-email-yang.lee@linux.alibaba.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/cardreader/rtsx_pcr.c

index 5e94e87c80b7fe9075ece4c9827e3cf5dd80da67..273311184669af4d062402c38342904da8e3bf6c 100644 (file)
@@ -1799,7 +1799,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;
@@ -1824,7 +1823,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 */