From patchwork Tue Oct 21 10:05:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Varka Bhadram X-Patchwork-Id: 5112471 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 2872C9F349 for ; Tue, 21 Oct 2014 10:09:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5440620122 for ; Tue, 21 Oct 2014 10:09:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CCC820148 for ; Tue, 21 Oct 2014 10:09:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755167AbaJUKJG (ORCPT ); Tue, 21 Oct 2014 06:09:06 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:49204 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751331AbaJUKJF (ORCPT ); Tue, 21 Oct 2014 06:09:05 -0400 Received: by mail-pa0-f50.google.com with SMTP id kx10so1079361pab.37 for ; Tue, 21 Oct 2014 03:09:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SZ3oIbK670M482JsW4vAvNEPuedGPnnQ63y5+6+zzhI=; b=mVoItHBsRt0hcekQdux1z2RlYKqi6O1lBzBHd5E77UTIIzd8SrJto7UgOaDTxO/bSF jbCyBZNNmVzNwmmWEYRY2G1GSCo2tGm3mhSpTgnVnwfe0oNnGmLdnJBsxGbcZs0551Nv u2V2SGm9MRe3rMAUBgo0G8J3uVoMUEjXK6gZBumIboe5K6iNqRbvEjP9Ecp+hiqe/U7G OrmMID/d6K4l/iLN05ViKdXfuW0b/Tocm7WiVBPWj31vL671VGmRDD1begzUkNBv7tEY yO2xCnavwdYr0YMdjF9t6LegTkTYyFx7JS1MbKqxLjDZjtB+DOChcDU7iftfqzZUVpTF cGFg== X-Received: by 10.66.220.3 with SMTP id ps3mr34284179pac.8.1413886145294; Tue, 21 Oct 2014 03:09:05 -0700 (PDT) Received: from cdac.hyderabad.cdac.in ([196.12.45.164]) by mx.google.com with ESMTPSA id oq10sm2261763pac.47.2014.10.21.03.09.01 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 03:09:03 -0700 (PDT) From: Varka Bhadram X-Google-Original-From: Varka Bhadram To: linux-spi@vger.kernel.org Cc: Varka Bhadram Subject: [PATCH spi 4/7] spi-s3c64xx: remove duplicate check on resource Date: Tue, 21 Oct 2014 15:35:47 +0530 Message-Id: <1413885950-24208-4-git-send-email-varkab@cdac.in> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1413885950-24208-1-git-send-email-varkab@cdac.in> References: <1413885950-24208-1-git-send-email-varkab@cdac.in> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-8.2 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 Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram --- drivers/spi/spi-s3c64xx.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 4188b2f..5a0ce49 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1176,12 +1176,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) return -ENODEV; } - mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (mem_res == NULL) { - dev_err(&pdev->dev, "Unable to get SPI MEM resource\n"); - return -ENXIO; - } - irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_warn(&pdev->dev, "Failed to get IRQ: %d\n", irq); @@ -1250,6 +1244,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) /* the spi->mode bits understood by this driver: */ master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; + mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); sdd->regs = devm_ioremap_resource(&pdev->dev, mem_res); if (IS_ERR(sdd->regs)) { ret = PTR_ERR(sdd->regs);