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: 3385341 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 A4EB59F314 for ; Fri, 20 Dec 2013 02:22:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EACD0206B8 for ; Fri, 20 Dec 2013 02:22:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 00116206AD for ; Fri, 20 Dec 2013 02:22:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932094Ab3LTCWW (ORCPT ); Thu, 19 Dec 2013 21:22:22 -0500 Received: from mail-bk0-f51.google.com ([209.85.214.51]:47468 "EHLO mail-bk0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932085Ab3LTCWV (ORCPT ); Thu, 19 Dec 2013 21:22:21 -0500 Received: by mail-bk0-f51.google.com with SMTP id 6so988442bkj.38 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 Cc: yongjun_wei@trendmicro.com.cn, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.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-s3c24xx.c | 7 ------- 1 file changed, 7 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-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);