From patchwork Fri Dec 20 02:22:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 3385381 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 952B8C0D4A for ; Fri, 20 Dec 2013 02:23:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CDDEB206AD for ; Fri, 20 Dec 2013 02:23:22 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC7E8206AA for ; Fri, 20 Dec 2013 02:23:21 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vtpjt-0000xo-BR; Fri, 20 Dec 2013 02:22:57 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vtpji-00046P-LJ; Fri, 20 Dec 2013 02:22:46 +0000 Received: from mail-bk0-x235.google.com ([2a00:1450:4008:c01::235]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vtpjf-000459-AX for linux-arm-kernel@lists.infradead.org; Fri, 20 Dec 2013 02:22:43 +0000 Received: by mail-bk0-f53.google.com with SMTP id na10so995775bkb.12 for ; Thu, 19 Dec 2013 18:22:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=Z01eawFMHjCBoB2L8kNY8LmnAbVKk1U22YvHN3e9nFE=; b=hcV9kN+tH6u90pmtKRzQH6406cW6AnH82MM8CD6PURaEuWI0B+Gr4/D1eE2yj6iO4R pmMogRiif+7ZdTP4NA9pMfNASYCSx/8LINFfzxl/AzDqmZRCPkQ0+zMz4XDsevGWqR6s X/cWzFIAxD903bXpRaZ+DyPHDWeXlITQNVGINVZQCjeGbuM17t+1++7umSBhSmguZYQn yg+/eT0iK2lpZUYwCzdcCnxlyHjmE72B9t7Ad5tnLDx/F/JggZo/tN+sBg1wgmhw8R+b mzhkjKkOEj6Yz2PSURJ70RICkjJdKwiNU6VyaIdnsdEKavMjh9ANH3fk/Q9OPNO0+5Mc Ygng== MIME-Version: 1.0 X-Received: by 10.204.229.139 with SMTP id ji11mr3224524bkb.4.1387506140607; Thu, 19 Dec 2013 18:22:20 -0800 (PST) Received: by 10.204.74.130 with HTTP; Thu, 19 Dec 2013 18:22:20 -0800 (PST) Date: Fri, 20 Dec 2013 10:22:20 +0800 Message-ID: Subject: [PATCH -next] spi: spi-s3c24xx: remove redundant return value check of platform_get_resource() From: Wei Yongjun To: ben-linux@fluff.org, kgene.kim@samsung.com, broonie@kernel.org, jg1.han@samsung.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131219_212243_500276_87D9C600 X-CRM114-Status: UNSURE ( 9.68 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: yongjun_wei@trendmicro.com.cn, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun Reviewed-by: Jingoo Han --- drivers/spi/spi-s3c24xx.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c index ebf80bb..2ccb28d 100644 --- a/drivers/spi/spi-s3c24xx.c +++ b/drivers/spi/spi-s3c24xx.c @@ -560,14 +560,7 @@ static int s3c24xx_spi_probe(struct platform_device *pdev) dev_dbg(hw->dev, "bitbang at %p\n", &hw->bitbang); /* find and map our resources */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) { - dev_err(&pdev->dev, "Cannot get IORESOURCE_MEM\n"); - err = -ENOENT; - goto err_no_pdata; - } - hw->regs = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(hw->regs)) { err = PTR_ERR(hw->regs);