aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-06-05 05:24:11 -0400
committerChris Ball <cjb@laptop.org>2013-06-27 11:24:40 -0400
commitdd369800202f1aeeb23b64fe9d336d67b202c3b2 (patch)
treef28a4aa3b5cf0ddb62efdeb13e0199bb3f4d3ee6
parentbcc8766696fe2023b498a4a5c19cf8d2193aa62e (diff)
mmc: dw_mmc: eliminate useless usage of ret
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>
-rw-r--r--drivers/mmc/host/dw_mmc-pci.c8
-rw-r--r--drivers/mmc/host/dw_mmc-pltfm.c17
2 files changed, 5 insertions, 20 deletions
diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c
index 083fcd29c9c6..c469ce624bb8 100644
--- a/drivers/mmc/host/dw_mmc-pci.c
+++ b/drivers/mmc/host/dw_mmc-pci.c
@@ -100,22 +100,18 @@ static void dw_mci_pci_remove(struct pci_dev *pdev)
100#ifdef CONFIG_PM_SLEEP 100#ifdef CONFIG_PM_SLEEP
101static int dw_mci_pci_suspend(struct device *dev) 101static int dw_mci_pci_suspend(struct device *dev)
102{ 102{
103 int ret;
104 struct pci_dev *pdev = to_pci_dev(dev); 103 struct pci_dev *pdev = to_pci_dev(dev);
105 struct dw_mci *host = pci_get_drvdata(pdev); 104 struct dw_mci *host = pci_get_drvdata(pdev);
106 105
107 ret = dw_mci_suspend(host); 106 return dw_mci_suspend(host);
108 return ret;
109} 107}
110 108
111static int dw_mci_pci_resume(struct device *dev) 109static int dw_mci_pci_resume(struct device *dev)
112{ 110{
113 int ret;
114 struct pci_dev *pdev = to_pci_dev(dev); 111 struct pci_dev *pdev = to_pci_dev(dev);
115 struct dw_mci *host = pci_get_drvdata(pdev); 112 struct dw_mci *host = pci_get_drvdata(pdev);
116 113
117 ret = dw_mci_resume(host); 114 return dw_mci_resume(host);
118 return ret;
119} 115}
120#else 116#else
121#define dw_mci_pci_suspend NULL 117#define dw_mci_pci_suspend NULL
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 526abae74c74..2721bd5839cb 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -56,8 +56,7 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
56 } 56 }
57 57
58 platform_set_drvdata(pdev, host); 58 platform_set_drvdata(pdev, host);
59 ret = dw_mci_probe(host); 59 return dw_mci_probe(host);
60 return ret;
61} 60}
62EXPORT_SYMBOL_GPL(dw_mci_pltfm_register); 61EXPORT_SYMBOL_GPL(dw_mci_pltfm_register);
63 62
@@ -81,26 +80,16 @@ EXPORT_SYMBOL_GPL(dw_mci_pltfm_remove);
81 */ 80 */
82static int dw_mci_pltfm_suspend(struct device *dev) 81static int dw_mci_pltfm_suspend(struct device *dev)
83{ 82{
84 int ret;
85 struct dw_mci *host = dev_get_drvdata(dev); 83 struct dw_mci *host = dev_get_drvdata(dev);
86 84
87 ret = dw_mci_suspend(host); 85 return dw_mci_suspend(host);
88 if (ret)
89 return ret;
90
91 return 0;
92} 86}
93 87
94static int dw_mci_pltfm_resume(struct device *dev) 88static int dw_mci_pltfm_resume(struct device *dev)
95{ 89{
96 int ret;
97 struct dw_mci *host = dev_get_drvdata(dev); 90 struct dw_mci *host = dev_get_drvdata(dev);
98 91
99 ret = dw_mci_resume(host); 92 return dw_mci_resume(host);
100 if (ret)
101 return ret;
102
103 return 0;
104} 93}
105#else 94#else
106#define dw_mci_pltfm_suspend NULL 95#define dw_mci_pltfm_suspend NULL