From patchwork Wed Jun 5 09:24:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 2668131 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id EDED240232 for ; Wed, 5 Jun 2013 09:24:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753235Ab3FEJYU (ORCPT ); Wed, 5 Jun 2013 05:24:20 -0400 Received: from mga02.intel.com ([134.134.136.20]:53600 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753285Ab3FEJYS (ORCPT ); Wed, 5 Jun 2013 05:24:18 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 05 Jun 2013 02:24:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,804,1363158000"; d="scan'208";a="324523580" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.173]) by orsmga001.jf.intel.com with ESMTP; 05 Jun 2013 02:24:16 -0700 Received: from andy by smile with local (Exim 4.80) (envelope-from ) id 1Uk9wz-0008Dp-Er; Wed, 05 Jun 2013 12:24:13 +0300 From: Andy Shevchenko To: Jaehoon Chung , Chris Ball , linux-mmc@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH 2/3] mmc: dw: eliminate useless usage of ret Date: Wed, 5 Jun 2013 12:24:11 +0300 Message-Id: <1370424252-31562-2-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 1.8.2.rc0.22.gb3600c3 In-Reply-To: <1370424252-31562-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1370424252-31562-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org In few places usage of ret variable is not needed. This patch simplifies that pieces of code. Signed-off-by: Andy Shevchenko Acked-by: Seungwon Jeon --- drivers/mmc/host/dw_mmc-pci.c | 8 ++------ drivers/mmc/host/dw_mmc-pltfm.c | 17 +++-------------- 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 083fcd2..c469ce6 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) #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 diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c index 526abae..2721bd5 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, } 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