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: 9561227 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 0B6AF60575 for ; Tue, 7 Feb 2017 21:37:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F258B28485 for ; Tue, 7 Feb 2017 21:37:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E747228490; Tue, 7 Feb 2017 21:37:51 +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=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BBEA328485 for ; Tue, 7 Feb 2017 21:37:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cbDSN-0003gF-RX; Tue, 07 Feb 2017 21:37:47 +0000 Received: from mail-wm0-f65.google.com ([74.125.82.65]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cbDSF-0003Qf-GE for linux-amlogic@lists.infradead.org; Tue, 07 Feb 2017 21:37:44 +0000 Received: by mail-wm0-f65.google.com with SMTP id v77so30621479wmv.0 for ; Tue, 07 Feb 2017 13:37:23 -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=hnlOvzLXTSce4/qNL9eM1us9z2ZACwjvu1bISuMVcF6NTKCcukm5kf1EGVK2pAARBq 96tc5QN9Awh+dDA7qL+OwOVbPfoW4wMaQvegj7u1SDvrXy3XFONGpKzNuIPPNgqObxEy /b5geqYaUReJCAxNK0xAytjB5acSSWWE9UDHW9QkXXu9JhnMdvrPuthZ6PPdsEnE0Jv0 viTZBuZyrqT8i07bzPU8LEKBUGFWL0HliIfP0I1RWkek+IsfaiZ7fdWbPNbl7ppKYqF6 sxs9W0W8dJbJs2AikyLbMO15a6a9NLmE8toJb1n9FAuRcN9HxVW36LAvvMif824sOBPj 77vQ== X-Gm-Message-State: AMke39lDhVrkuVuSBqR4CRix1kYxefCf5HkmHh+k13vp9V5wwgY7oVuaftbKLip9cZxuHQ== 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> 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170207_133739_948364_F3D739C6 X-CRM114-Status: UNSURE ( 8.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlo Caione , linux-amlogic@lists.infradead.org, "linux-mmc@vger.kernel.org" Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.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);