From patchwork Tue Oct 21 10:05:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Varka Bhadram X-Patchwork-Id: 5112461 Return-Path: X-Original-To: patchwork-linux-spi@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 35FAEC11AC for ; Tue, 21 Oct 2014 10:09:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6BD1F20138 for ; Tue, 21 Oct 2014 10:09:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 903E320122 for ; Tue, 21 Oct 2014 10:09:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755165AbaJUKJD (ORCPT ); Tue, 21 Oct 2014 06:09:03 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:59950 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751331AbaJUKJC (ORCPT ); Tue, 21 Oct 2014 06:09:02 -0400 Received: by mail-pd0-f177.google.com with SMTP id v10so1036219pde.8 for ; Tue, 21 Oct 2014 03:09:01 -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=ofWmIaxd+ojK1xWsSltIyFEMLYihIIAl8RfAw1i5WhU=; b=LJNvnW1vdYAucVFoOqaWYdQANghG43wOX8Ka71t8tGCAQy2els+0PhR+M/4Go3X9Ek aukUGFIGUb+OnbhBU4S0BCJ3vXv5Zl3aYgf51vrJih5eOK6g8lr6QTcnMVficeQDUGkt W1ghaelh5SL5DHjJa4mlEbi/S/DJ/UXIJyebgOftmCX1i97roeIn2vNo9RJ91WIKkEnJ aUdmNqyhJHKg6HKV6TXSohM/n7BPklJ3UaytG+kovipm9Y6nZN+XwwL3J1KmUDeFqdZ5 1YBDID8qtzoDTJ9FaWkb6YwWbdL1JN4FWuePTNbesq3Rh6ULJWLzPlUOn7LwmiF1MG9t 6ClA== X-Received: by 10.68.226.226 with SMTP id rv2mr33917565pbc.77.1413886141399; Tue, 21 Oct 2014 03:09:01 -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.08.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 03:09:00 -0700 (PDT) From: Varka Bhadram X-Google-Original-From: Varka Bhadram To: linux-spi@vger.kernel.org Cc: Varka Bhadram Subject: [PATCH spi 3/7] spi-sirf: remove duplicate check on resource Date: Tue, 21 Oct 2014 15:35:46 +0530 Message-Id: <1413885950-24208-3-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-sirf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c index f59d417..ee85da2 100644 --- a/drivers/spi/spi-sirf.c +++ b/drivers/spi/spi-sirf.c @@ -502,12 +502,6 @@ static int spi_sirfsoc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, master); sspi = spi_master_get_devdata(master); - mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!mem_res) { - dev_err(&pdev->dev, "Unable to get IO resource\n"); - ret = -ENODEV; - goto free_master; - } master->num_chipselect = num_cs; for (i = 0; i < master->num_chipselect; i++) { @@ -534,6 +528,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev) } } + mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); sspi->base = devm_ioremap_resource(&pdev->dev, mem_res); if (IS_ERR(sspi->base)) { ret = PTR_ERR(sspi->base);