From patchwork Tue Feb 7 21:35:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9561233 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 9E2C96047A for ; Tue, 7 Feb 2017 21:38:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 912E32848B for ; Tue, 7 Feb 2017 21:38:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8624328492; Tue, 7 Feb 2017 21:38:25 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 582D828490 for ; Tue, 7 Feb 2017 21:38:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932333AbdBGViX (ORCPT ); Tue, 7 Feb 2017 16:38:23 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34155 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755340AbdBGViV (ORCPT ); Tue, 7 Feb 2017 16:38:21 -0500 Received: by mail-wm0-f68.google.com with SMTP id c85so30712489wmi.1 for ; Tue, 07 Feb 2017 13:36:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=lRgp6mgsqbuzOrWy2CDTy/kwqN4zHO0aFy8YrjpVg8w=; b=UuM29qA9bzJ3qBRHZyUCrBaoJ7lXiIRJ9l2i2SA6v+i+GgjOP79SRghSdy+TeXqSeg xodY6koTVDxeSb4SnZfdh1RuyWbsdyh1409tqDgrwZS25VwALlU5UQioN2CcTLWqgSRK UrwgyrIHVUN2+5Q6PWoDNOM0dPusaba3yKNbguEmZRikbKfD0473su+gYtIY2/crwtpn HmISnNOqzMtcAHCS+vIqsgf/LBO54aAILoeufPLipjAqbPSPULrQUx7a4tx8723NLiUW G6vITeGwPbLZxaIET5Oqg7aTTmYeWbiYjXQt9AP0xpg6h/LetJjUkttB5gyvtt/ogoTv Mwyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=lRgp6mgsqbuzOrWy2CDTy/kwqN4zHO0aFy8YrjpVg8w=; b=XsfQEpFz9BDtkzLJoyut6x/jsmFtIYFnuet0XkzQN+gUOULd41ReCsihnZ+t5G+Csr ZYnXrSoxW3zaBqqe9qV/2pQG3jHiiQE6AgQA5YPhLuR/TCWqE4yJq1qSMGCFvDorzAkt 1p7h6kyzdtCP6B0ymedNtqoK85nTrEdc5caRpITUwmp2i3qqutQegZH9rTtdTFvxfe/b hpxd+qylJNVwvPLC2XnU544exwulv2iiHNmMTWv7LKUBQl2uihXdocMJhUOaX4+6EQVW 3e+IKtOOPPdvG/GwhXatS4lZBhR5ZBfEMHbRlK4xILil4j8mWQnrJx68ymmjTNTr42zq 4ZIg== X-Gm-Message-State: AMke39k1lrg1I/wDIQE8b24Sb3vIPEVlXv0VsBTIA3LATEiIAKyDVDjonsJ0w3fxSevgeA== X-Received: by 10.28.130.212 with SMTP id e203mr13854636wmd.104.1486503382091; Tue, 07 Feb 2017 13:36:22 -0800 (PST) Received: from ?IPv6:2003:c6:ebce:1e00:cd3f:c3c7:98c5:4fec? (p200300C6EBCE1E00CD3FC3C798C54FEC.dip0.t-ipconnect.de. [2003:c6:ebce:1e00:cd3f:c3c7:98c5:4fec]) by smtp.googlemail.com with ESMTPSA id 10sm9439117wrw.13.2017.02.07.13.36.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 13:36:21 -0800 (PST) From: Heiner Kallweit Subject: [PATCH v3 8/9] mmc: meson-gx: remove unneeded checks in remove To: Ulf Hansson , Kevin Hilman References: <0991d40b-e05b-2fcb-9ee4-7b529448de69@gmail.com> Cc: Carlo Caione , "linux-mmc@vger.kernel.org" , linux-amlogic@lists.infradead.org Message-ID: Date: Tue, 7 Feb 2017 22:35:40 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <0991d40b-e05b-2fcb-9ee4-7b529448de69@gmail.com> 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 The remove callback is called only if probe finished successfully. Therefore these checks are not needed. Signed-off-by: Heiner Kallweit Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman --- v3: - no changes --- drivers/mmc/host/meson-gx-mmc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 4feb8971..3cc6334a 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -808,15 +808,11 @@ static int meson_mmc_remove(struct platform_device *pdev) { struct meson_host *host = dev_get_drvdata(&pdev->dev); - if (WARN_ON(!host)) - return 0; - /* disable interrupts */ writel(0, host->regs + SD_EMMC_IRQ_EN); - if (host->bounce_buf) - dma_free_coherent(host->dev, host->bounce_buf_size, - host->bounce_buf, host->bounce_dma_addr); + dma_free_coherent(host->dev, host->bounce_buf_size, + host->bounce_buf, host->bounce_dma_addr); clk_disable_unprepare(host->cfg_div_clk); clk_disable_unprepare(host->core_clk);