mmc: core: Remove unnecessary validations for bus_ops callbacks
[firefly-linux-kernel-4.4.55.git] / drivers / mmc / core / bus.c
index 64145a32b917b37ce862e392fe3600417c99c336..824644875d41691fe6dc099c53e4770f1cbea23e 100644 (file)
@@ -185,24 +185,16 @@ static int mmc_runtime_suspend(struct device *dev)
 {
        struct mmc_card *card = mmc_dev_to_card(dev);
        struct mmc_host *host = card->host;
-       int ret = 0;
 
-       if (host->bus_ops->runtime_suspend)
-               ret = host->bus_ops->runtime_suspend(host);
-
-       return ret;
+       return host->bus_ops->runtime_suspend(host);
 }
 
 static int mmc_runtime_resume(struct device *dev)
 {
        struct mmc_card *card = mmc_dev_to_card(dev);
        struct mmc_host *host = card->host;
-       int ret = 0;
 
-       if (host->bus_ops->runtime_resume)
-               ret = host->bus_ops->runtime_resume(host);
-
-       return ret;
+       return host->bus_ops->runtime_resume(host);
 }
 
 static int mmc_runtime_idle(struct device *dev)