mmc: dw_mmc: eliminate useless usage of ret
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 5 Jun 2013 09:24:11 +0000 (12:24 +0300)
committerChris Ball <cjb@laptop.org>
Thu, 27 Jun 2013 15:24:40 +0000 (11:24 -0400)
In few places usage of ret variable is not needed.
This patch simplifies those pieces of code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/dw_mmc-pci.c
drivers/mmc/host/dw_mmc-pltfm.c

index 083fcd29c9c60dd89f8cd935589a5501aabbc541..c469ce624bb86283a589427afadc619460d3c660 100644 (file)
@@ -100,22 +100,18 @@ static void dw_mci_pci_remove(struct pci_dev *pdev)
 #ifdef CONFIG_PM_SLEEP
 static int dw_mci_pci_suspend(struct device *dev)
 {
-       int ret;
        struct pci_dev *pdev = to_pci_dev(dev);
        struct dw_mci *host = pci_get_drvdata(pdev);
 
-       ret = dw_mci_suspend(host);
-       return ret;
+       return dw_mci_suspend(host);
 }
 
 static int dw_mci_pci_resume(struct device *dev)
 {
-       int ret;
        struct pci_dev *pdev = to_pci_dev(dev);
        struct dw_mci *host = pci_get_drvdata(pdev);
 
-       ret = dw_mci_resume(host);
-       return ret;
+       return dw_mci_resume(host);
 }
 #else
 #define dw_mci_pci_suspend     NULL
index 526abae74c74d5f00333452082c4e4a2e83c050c..2721bd5839cb36b60fdb74d931046162ac806965 100644 (file)
@@ -56,8 +56,7 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
        }
 
        platform_set_drvdata(pdev, host);
-       ret = dw_mci_probe(host);
-       return ret;
+       return dw_mci_probe(host);
 }
 EXPORT_SYMBOL_GPL(dw_mci_pltfm_register);
 
@@ -81,26 +80,16 @@ EXPORT_SYMBOL_GPL(dw_mci_pltfm_remove);
  */
 static int dw_mci_pltfm_suspend(struct device *dev)
 {
-       int ret;
        struct dw_mci *host = dev_get_drvdata(dev);
 
-       ret = dw_mci_suspend(host);
-       if (ret)
-               return ret;
-
-       return 0;
+       return dw_mci_suspend(host);
 }
 
 static int dw_mci_pltfm_resume(struct device *dev)
 {
-       int ret;
        struct dw_mci *host = dev_get_drvdata(dev);
 
-       ret = dw_mci_resume(host);
-       if (ret)
-               return ret;
-
-       return 0;
+       return dw_mci_resume(host);
 }
 #else
 #define dw_mci_pltfm_suspend   NULL