From patchwork Fri Jul 15 01:54:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 9231015 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 02A146075D for ; Fri, 15 Jul 2016 01:54:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4AD92830A for ; Fri, 15 Jul 2016 01:54:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8C8328326; Fri, 15 Jul 2016 01:54:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16F202830A for ; Fri, 15 Jul 2016 01:54:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752056AbcGOByO (ORCPT ); Thu, 14 Jul 2016 21:54:14 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:57650 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752025AbcGOByN (ORCPT ); Thu, 14 Jul 2016 21:54:13 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OAC02HUD2MB0590@mailout1.samsung.com> for linux-mmc@vger.kernel.org; Fri, 15 Jul 2016 10:54:11 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.112]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id C1.25.05161.34248875; Fri, 15 Jul 2016 10:54:11 +0900 (KST) X-AuditID: cbfee68f-f79476d000001429-1f-57884243325c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 77.91.02101.34248875; Fri, 15 Jul 2016 10:54:11 +0900 (KST) Received: from localhost.localdomain ([10.113.62.216]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OAC00L4V2MA4S70@mmp2.samsung.com>; Fri, 15 Jul 2016 10:54:11 +0900 (KST) From: Jaehoon Chung To: linux-mmc@vger.kernel.org Cc: ulf.hansson@linaro.org, shawn.lin@rock-chips.com, Jaehoon Chung Subject: [PATCH] mmc: dw_mmc: remove the unnecessary IS_ERR() checking for ciu/biu clock Date: Fri, 15 Jul 2016 10:54:08 +0900 Message-id: <1468547648-4458-1-git-send-email-jh80.chung@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLLMWRmVeSWpSXmKPExsWyRsSkQNfZqSPcYM0NXosbv9pYLY7872e0 uPNkPavF8bXhDiwed67tYfP4O2s/i0ffllWMHp83yQWwRHHZpKTmZJalFunbJXBlPF6whq3g DWfFjJ45rA2MWzi6GDk4JARMJLY+Fepi5AQyxSQu3FvP1sXIxSEksIJRounjKzaYmpXfbCHi sxglvk+9DVX0A6jo01lWkG42AR2J7d+OM4HYIgKyEj//XGADsZkF4iQWHf3JDmILC0RJHL+9 HMxmEVCV2LBwFSOIzSvgKjH1wjEWiCvkJE4em8wKskBC4DWbxKI/r1ggGgQkvk0+xAJxkazE pgPMEPWSEgdX3GCZwCi4gJFhFaNoakFyQXFSepGxXnFibnFpXrpecn7uJkZgKJ7+96x/B+Pd A9aHGAU4GJV4eCuutocLsSaWFVfmHmI0BdowkVlKNDkfGPB5JfGGxmZGFqYmpsZG5pZmSuK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LP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If ciu/biu clock are NULL, clk_disable_unprepare should be just returned. In clk_disable_unprepare(), already checked whether clk is error or NULL. Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin --- drivers/mmc/host/dw_mmc.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 2dfdc58..9fab5ed 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -3184,12 +3184,10 @@ err_dmaunmap: host->dma_ops->exit(host); err_clk_ciu: - if (!IS_ERR(host->ciu_clk)) - clk_disable_unprepare(host->ciu_clk); + clk_disable_unprepare(host->ciu_clk); err_clk_biu: - if (!IS_ERR(host->biu_clk)) - clk_disable_unprepare(host->biu_clk); + clk_disable_unprepare(host->biu_clk); return ret; } @@ -3215,11 +3213,8 @@ void dw_mci_remove(struct dw_mci *host) if (host->use_dma && host->dma_ops->exit) host->dma_ops->exit(host); - if (!IS_ERR(host->ciu_clk)) - clk_disable_unprepare(host->ciu_clk); - - if (!IS_ERR(host->biu_clk)) - clk_disable_unprepare(host->biu_clk); + clk_disable_unprepare(host->ciu_clk); + clk_disable_unprepare(host->biu_clk); } EXPORT_SYMBOL(dw_mci_remove);