From patchwork Wed Jan 17 11:27:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 10169119 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 A42E4601D3 for ; Wed, 17 Jan 2018 11:21:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9268927F91 for ; Wed, 17 Jan 2018 11:21:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84E0B28569; Wed, 17 Jan 2018 11:21:13 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham 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 E06C527F91 for ; Wed, 17 Jan 2018 11:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=MfJEjxuMYDvsV8PV000T0yWv1ulSD0M9T/gFVq1YzGQ=; b=AVc2GbhTG6rzYA kTTBTKCdxFaKCC2easl6B1CNTg7bRf96kDsil3z82+P5f+GTK2iTOJqIDrcbomzGf3n4SXNK9Cz3j DP+55hCq/ypgpr1F2GoiHrXxaLoxou8GtIHuSLq2HhoytO12gLrQDaPt5kRqVD5wcJCZ/g1yi55pH 00HRRJft21L0tA+3PNDt5Nifneye0SyGE0h7oMlCnmK6/9UYMWc77aoSziDD96zzvUQGetl0cNxms sr1dKKjKGs5W+BXP4Pi0H14DT4dzXz3uTx/c8u2ejaSwPaEAEHPO6P4WoT3kYMiGnV7Y9mfvZ15A5 YEmqklFUBEMB3o/GapFQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eblmJ-0000IX-3g; Wed, 17 Jan 2018 11:21:11 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eblmG-0000ET-4U for linux-arm-kernel@lists.infradead.org; Wed, 17 Jan 2018 11:21:09 +0000 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E646EAB1446E2; Wed, 17 Jan 2018 19:20:41 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.361.1; Wed, 17 Jan 2018 19:20:34 +0800 From: Wei Yongjun To: Vinod Koul , Dan Williams , Maxime Coquelin , Alexandre Torgue Subject: [PATCH -next] dmaengine: stm32-dmamux: Remove unnecessary platform_get_resource() error check Date: Wed, 17 Jan 2018 11:27:10 +0000 Message-ID: <1516188430-145326-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dmaengine@vger.kernel.org, Wei Yongjun , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP devm_ioremap_resource() already checks if the resource is NULL, so remove the unnecessary platform_get_resource() error check. Signed-off-by: Wei Yongjun Acked-by: Pierre-Yves MORDRET --- drivers/dma/stm32-dmamux.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c index d5db0f6..4dbb30c 100644 --- a/drivers/dma/stm32-dmamux.c +++ b/drivers/dma/stm32-dmamux.c @@ -253,9 +253,6 @@ static int stm32_dmamux_probe(struct platform_device *pdev) } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - iomem = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(iomem)) return PTR_ERR(iomem);