From patchwork Tue Oct 21 10:05:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Varka Bhadram X-Patchwork-Id: 5112501 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 636869F349 for ; Tue, 21 Oct 2014 10:09:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9822620138 for ; Tue, 21 Oct 2014 10:09:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BDBA420121 for ; Tue, 21 Oct 2014 10:09:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754981AbaJUKJS (ORCPT ); Tue, 21 Oct 2014 06:09:18 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:63791 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755168AbaJUKJR (ORCPT ); Tue, 21 Oct 2014 06:09:17 -0400 Received: by mail-pa0-f54.google.com with SMTP id rd3so386094pab.27 for ; Tue, 21 Oct 2014 03:09:16 -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=26GpO/AYh1WDxEhRbsvqWG81OlI0KOFCd+Kaqe0VTu0=; b=f50gPpwQXUti6mceOwIEwbGpN3hcis/kEbrMbIGJYmlKN5LkOBcLjSVsA5EgaL/Qjs Bn7sV9otnyV/6pPz6Da2DBkZgFeC42/3WG8cE69iR2fUX1uRY56ZuWBwsVbpjfJUD3Ik CnneAP2/+FrsNGXbWcJ7sjfRtp5KXNx/ne+mobOW5Sd4Nr40qzuCTcmu+8dTLSd72Wdj 2Bqdgy0Ips1wk5Bkr9QP1W0uytRN16G38OIE2iXnEvF1t2bUZ1Z3RoqTglj+Ps5SQjuc JaXbPjbUz+e4vZB2JA3XnmqP7q8REaWB8rdFVtP8sxM0JcSeeNx7N1Czpy9ZTWLPQw/A i04A== X-Received: by 10.68.113.3 with SMTP id iu3mr34401641pbb.39.1413886156629; Tue, 21 Oct 2014 03:09:16 -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.13 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 03:09:15 -0700 (PDT) From: Varka Bhadram X-Google-Original-From: Varka Bhadram To: linux-spi@vger.kernel.org Cc: Varka Bhadram Subject: [PATCH spi 7/7] spi-ep93xx: remove duplicate check on resource Date: Tue, 21 Oct 2014 15:35:50 +0530 Message-Id: <1413885950-24208-7-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-ep93xx.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c index d7bac60..9a4c435 100644 --- a/drivers/spi/spi-ep93xx.c +++ b/drivers/spi/spi-ep93xx.c @@ -1077,20 +1077,14 @@ static int ep93xx_spi_probe(struct platform_device *pdev) } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "unable to get iomem resource\n"); - error = -ENODEV; - goto fail_put_clock; - } - - espi->sspdr_phys = res->start + SSPDR; - espi->regs_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(espi->regs_base)) { error = PTR_ERR(espi->regs_base); goto fail_put_clock; } + espi->sspdr_phys = res->start + SSPDR; + error = devm_request_irq(&pdev->dev, irq, ep93xx_spi_interrupt, 0, "ep93xx-spi", espi); if (error) {