From patchwork Tue Oct 21 10:05:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Varka Bhadram X-Patchwork-Id: 5112441 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 A720DC11AC for ; Tue, 21 Oct 2014 10:08:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5DE620122 for ; Tue, 21 Oct 2014 10:08:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1A7420121 for ; Tue, 21 Oct 2014 10:08:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753295AbaJUKI4 (ORCPT ); Tue, 21 Oct 2014 06:08:56 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:49238 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751561AbaJUKIz (ORCPT ); Tue, 21 Oct 2014 06:08:55 -0400 Received: by mail-pd0-f169.google.com with SMTP id w10so1066131pde.0 for ; Tue, 21 Oct 2014 03:08:54 -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; bh=IhF3Rg6u9EI4m1vLvI8QP6+xTmlbIxaJlryE0aY4THs=; b=bE7xYnTMyCtrEYDFFI3Pj8aTD0Gm7vx+JSCO+XsmXbqQF80hAI8Eloc0gvdmtbusn5 V3fF4j51mcpBBn94JsN9DKQSY7etcdIO0fdNP2Whij9+CRJB4CbPNhZy/4LtVqP8DjKB KWMwzeNAGKHeot+MHbgYV2iLWTxSqA58Z2H9YJlh+RwqtyzWIeIEXFvazWbI5MV/VQst /dPQX4fZe0dI3jDHYxp2f8wOX6lkQuLcLPYMDaYGwUSbS980wUES/4Q4Br4Gx6NaoHNf GAURk1OKVfiNNv1TPy4M/h+rUrrpyjOqwSTJBxYzJ5Thm3+iyct9ltbRC3WbPAmXx9vd 8L7A== X-Received: by 10.66.160.193 with SMTP id xm1mr14612004pab.115.1413886134695; Tue, 21 Oct 2014 03:08:54 -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.51 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 03:08:53 -0700 (PDT) From: Varka Bhadram X-Google-Original-From: Varka Bhadram To: linux-spi@vger.kernel.org Cc: Varka Bhadram Subject: [PATCH spi 1/7] spi-tegra20-slink: remove duplicate check on resource Date: Tue, 21 Oct 2014 15:35:44 +0530 Message-Id: <1413885950-24208-1-git-send-email-varkab@cdac.in> X-Mailer: git-send-email 1.7.9.5 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-tegra20-slink.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index a829563..59a85cc 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -1154,18 +1154,14 @@ static int tegra_slink_probe(struct platform_device *pdev) spin_lock_init(&tspi->lock); r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!r) { - dev_err(&pdev->dev, "No IO memory resource\n"); - ret = -ENODEV; - goto exit_free_master; - } - tspi->phys = r->start; tspi->base = devm_ioremap_resource(&pdev->dev, r); if (IS_ERR(tspi->base)) { ret = PTR_ERR(tspi->base); goto exit_free_master; } + tspi->phys = r->start; + spi_irq = platform_get_irq(pdev, 0); tspi->irq = spi_irq; ret = request_threaded_irq(tspi->irq, tegra_slink_isr,