From patchwork Fri Dec 20 02:21:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 3385361 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4DA489F314 for ; Fri, 20 Dec 2013 02:22:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 87434206AD for ; Fri, 20 Dec 2013 02:22:41 +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 9A7AA206AA for ; Fri, 20 Dec 2013 02:22:40 +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 1VtpjK-0000fa-0B; Fri, 20 Dec 2013 02:22:22 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VtpjH-000451-LA; Fri, 20 Dec 2013 02:22:19 +0000 Received: from mail-bk0-x236.google.com ([2a00:1450:4008:c01::236]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VtpjF-00044j-8d for linux-arm-kernel@lists.infradead.org; Fri, 20 Dec 2013 02:22:18 +0000 Received: by mail-bk0-f54.google.com with SMTP id v16so986278bkz.41 for ; Thu, 19 Dec 2013 18:21:54 -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=dHngG5rXC92TvfOZ2J3ihdDrohXn68BwR9nE3Swk1Ps=; b=mSv87GUQl/Y2DUeEeGCU6AZ1E9p1oWO6cWTSRL83JiY9jZxXzTsR2SRlSa4QRfd2mh L40Uyn2dij5wbdoG241c9gZhK4fYqy/lAm+CBLPyx+8k7kj1CUnR+calEPdFwNPy2HON S67pP56L2mt+03YuV7C1fk84sMj8zbJ2aw0vOy5BTxbugUNmuLMxAZ3K/lw453/3eiGA 1uCT+YTW9OoiyemaFBM+WRdhR6rTVs+LTU5GzgNDxc2azoJI4Ee6I5Mv5Uk8FAwuq44A 8I9VTv1IrRe603k/xbVNI4a51CwEpNgd0siEDeMTPapgCAKfXtWXl333knbwfg2nkaiS yN4Q== MIME-Version: 1.0 X-Received: by 10.205.45.65 with SMTP id uj1mr3285222bkb.16.1387506114613; Thu, 19 Dec 2013 18:21:54 -0800 (PST) Received: by 10.204.74.130 with HTTP; Thu, 19 Dec 2013 18:21:54 -0800 (PST) Date: Fri, 20 Dec 2013 10:21:54 +0800 Message-ID: Subject: [PATCH -next] spi: nuc900: remove redundant return value check of platform_get_resource() From: Wei Yongjun To: mcuos.com@gmail.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_212217_473783_5216F66B X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: yongjun_wei@trendmicro.com.cn, 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-nuc900.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c index 43d340c..5040630 100644 --- a/drivers/spi/spi-nuc900.c +++ b/drivers/spi/spi-nuc900.c @@ -368,12 +368,6 @@ static int nuc900_spi_probe(struct platform_device *pdev) hw->bitbang.txrx_bufs = nuc900_spi_txrx; hw->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (hw->res == NULL) { - dev_err(&pdev->dev, "Cannot get IORESOURCE_MEM\n"); - err = -ENOENT; - goto err_pdata; - } - hw->regs = devm_ioremap_resource(&pdev->dev, hw->res); if (IS_ERR(hw->regs)) { err = PTR_ERR(hw->regs);