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: 9548949 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 8294A60415 for ; Wed, 1 Feb 2017 06:49:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7275727E3E for ; Wed, 1 Feb 2017 06:49:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65EF42811C; Wed, 1 Feb 2017 06:49:57 +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 2273727E3E for ; Wed, 1 Feb 2017 06:49:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751380AbdBAGt4 (ORCPT ); Wed, 1 Feb 2017 01:49:56 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36704 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbdBAGtz (ORCPT ); Wed, 1 Feb 2017 01:49:55 -0500 Received: by mail-wm0-f66.google.com with SMTP id r18so3592405wmd.3 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=s6dUi62QU2frA/X5Dc4HlmiNKc8ztH6L09DCgq8eFvEDHEGy9pR16ZCUfd53NRf8Yh wqNIIiRYe5ElPXQWBzZzKfyC9LiSMB2VonA56pm7UH6OX1vRwQ7gFsME79a3EyFatFC2 nDRH+iCsCex7AZKJp5Oez5OyohaNMohIwtGj/dCwgP1krThWO9ChnZSuCaxvHdOFZU97 MkvtigJiJF8EtQBC2882HcXV/BoOlXitJtmhQ5RJ5deQB6m7fu1DDSgAG6gYcO+wCH2C PhY5FHq7WL0zdytp0Rily49ZYAUQOT3+mp0jKwVaVuS7URzySnJkpJfDAPrr8bMTUCkz tPGw== X-Gm-Message-State: AIkVDXIWmnpksd0aQ6zMaHyvNEiY7fOSGYICmKpzGAFo5Bf9h/J0zlUJkfHMMZnqNSkJyA== 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> Cc: linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org 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> 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 --- 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);