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: 3385331 Return-Path: X-Original-To: patchwork-linux-spi@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 219D49F314 for ; Fri, 20 Dec 2013 02:21:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5F9A2206AD for ; Fri, 20 Dec 2013 02:21:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A09D5206AA for ; Fri, 20 Dec 2013 02:21:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932092Ab3LTCV4 (ORCPT ); Thu, 19 Dec 2013 21:21:56 -0500 Received: from mail-bk0-f48.google.com ([209.85.214.48]:63157 "EHLO mail-bk0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932085Ab3LTCVz (ORCPT ); Thu, 19 Dec 2013 21:21:55 -0500 Received: by mail-bk0-f48.google.com with SMTP id r7so966235bkg.7 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 Cc: yongjun_wei@trendmicro.com.cn, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);