From patchwork Wed Feb 1 06:49:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9548967 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 1EA6060415 for ; Wed, 1 Feb 2017 06:50:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E54627E3E for ; Wed, 1 Feb 2017 06:50:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0334B2840E; Wed, 1 Feb 2017 06:50:37 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,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 9CAC727E3E for ; Wed, 1 Feb 2017 06:50:37 +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 1cYokS-0004bM-Vk; Wed, 01 Feb 2017 06:50:32 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cYokA-00035b-7o for linux-amlogic@lists.infradead.org; Wed, 01 Feb 2017 06:50:17 +0000 Received: by mail-wm0-x244.google.com with SMTP id c85so3600691wmi.1 for ; Tue, 31 Jan 2017 22:49:55 -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=8dtIQKoYyyfecUCqjNGM1jz/EE2F0AW9CjWX21eOIpc=; b=H84K9EW+Rc29KgInZ+iLjstI6A0XH+pTAyhMhGqi9vABCF20o4Vmwpabm5fAunzReA z2j+AGp245G4oNVqEsPGxVAOoGpcOgMYT1kS9BRLjjBtt6u9i7ABLNTgIQccY72g6ZyX 5JSw+Tdd7/Mpe/RcVS+REPp1IZjh8hTM8rtdwfsHA0Q7jYFPRL+zIbirQBFxOe51QJcm rrnAJybDLXRvnkYySYK0CMyRF+lxr6P7BRZd2bHmTEV6UuxHRaP2yThPRvwDPVwCtD0t aavWwhbxMF0pnTYqV6ta8tb5egUCfvUBddQIVHd4mkuMllIqnro88NEYe67e5vFrxiYW lGCg== 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=8dtIQKoYyyfecUCqjNGM1jz/EE2F0AW9CjWX21eOIpc=; b=DxENZM3GX+NFOfV0LXNtWkoS8HOuhgYR24lfiGmts9OEzdt0kASHrSycJrk23YYmKi fJmQrAoLTUbaLi2IQ2nEq8Sb0XZOQwhGTu2wMUGsDsWVkAB3/SphLNebeyHfcv+1cgHV vbAKpBVbyKpERkTUBDZSm5S6/6+O9ToYTrvCILKKwWZvy7Ma8DJBThTY9m7NjXmN0GuK bHLYQH/K0RNXDkylL3DA5ivWu4RorZiKwit92gK6XxCnr7YzM8wE6UQhj6+tlx7mwD6O TegP5pybZQ7AB+9wRNuIBIj2JTySZxdXFZuHMZqps8CAWkxEjMB0rj8M5NVSZ/PqCWwc q0LA== X-Gm-Message-State: AIkVDXIug87JibFqrT1fJhoeF8CyQUA10uEdw7B/EbSVwLq8EGuOtA1pf9/4BFmjvuFQbQ== X-Received: by 10.223.171.65 with SMTP id r1mr1046007wrc.38.1485931794414; Tue, 31 Jan 2017 22:49:54 -0800 (PST) Received: from ?IPv6:2003:c6:ebc5:6c00:c4cb:dab7:ab36:4977? (p200300C6EBC56C00C4CBDAB7AB364977.dip0.t-ipconnect.de. [2003:c6:ebc5:6c00:c4cb:dab7:ab36:4977]) by smtp.googlemail.com with ESMTPSA id y1sm27799661wme.15.2017.01.31.22.49.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jan 2017 22:49:54 -0800 (PST) From: Heiner Kallweit Subject: [PATCH v2 8/9] mmc: meson-gx: remove unneeded checks in remove To: Ulf Hansson , Carlo Caione , Kevin Hilman References: <584e5061-d359-1436-05ee-3767a5a4b10f@gmail.com> Message-ID: Date: Wed, 1 Feb 2017 07:49:27 +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: <584e5061-d359-1436-05ee-3767a5a4b10f@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170131_225014_641012_95A45A6C X-CRM114-Status: UNSURE ( 8.58 ) 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: 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 --- v2: - 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 48ce4ba4..bc787444 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -811,15 +811,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);