From patchwork Fri Feb 14 03:19:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 3649481 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 3069B9F392 for ; Fri, 14 Feb 2014 03:19:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 65A7120149 for ; Fri, 14 Feb 2014 03:19:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E86220108 for ; Fri, 14 Feb 2014 03:19:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751491AbaBNDTe (ORCPT ); Thu, 13 Feb 2014 22:19:34 -0500 Received: from mail-yk0-f169.google.com ([209.85.160.169]:38401 "EHLO mail-yk0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbaBNDTd (ORCPT ); Thu, 13 Feb 2014 22:19:33 -0500 Received: by mail-yk0-f169.google.com with SMTP id 142so21668364ykq.0 for ; Thu, 13 Feb 2014 19:19:33 -0800 (PST) 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=WHlzchGEtISoxaPlpZiJj+mOag9UhNPN2SQUqcIfxBc=; b=u9RD/dAEAksKZpNpJY7bdqqjYdbwl2rQYUDV711CjL30aom5xAuPJQCJLmSnJ5gE5y sQpttU8MCJ9Aasu0fFI9AuYI3a5azPuy565wh0zuoYar7NYzBl1VVBlwlSHQyE7It3y7 PXaaE9haddZiGNKQwO2BNv4FVFszeEWA5PA7ZblHJcUrgmTXH8pq5bCtyWjcLHpsIBn3 t79MeQusYwA5DuA5C8Qt1gBC6cOhvX45dzDB5J8FIZyDN4qxhmD2LhCBWaIZu1AHx5x/ Y2d0rtoxSUNVPDTEFklwj4vZmRZC6DD6MPIG0RZXyxht1g/i7NbjMgGEALOsHivUHiKV QP9g== X-Received: by 10.236.228.137 with SMTP id f9mr230554yhq.44.1392347973379; Thu, 13 Feb 2014 19:19:33 -0800 (PST) Received: from localhost.localdomain ([177.194.40.80]) by mx.google.com with ESMTPSA id h23sm12581376yhc.0.2014.02.13.19.19.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Feb 2014 19:19:33 -0800 (PST) From: Fabio Estevam To: broonie@kernel.org Cc: marex@denx.de, linux-spi@vger.kernel.org, Fabio Estevam Subject: [PATCH 2/2] spi: spi-imx: Propagate the real error code on platform_get_irq() failure Date: Fri, 14 Feb 2014 01:19:22 -0200 Message-Id: <1392347962-9835-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1392347962-9835-1-git-send-email-festevam@gmail.com> References: <1392347962-9835-1-git-send-email-festevam@gmail.com> 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.4 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: Fabio Estevam No need to return a 'fake' return value on platform_get_irq() failure. Just return the error code itself instead. Signed-off-by: Fabio Estevam Acked-by: Marek Vasut --- drivers/spi/spi-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 2ccfde6..3577939 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -879,7 +879,7 @@ static int spi_imx_probe(struct platform_device *pdev) spi_imx->irq = platform_get_irq(pdev, 0); if (spi_imx->irq < 0) { - ret = -EINVAL; + ret = spi_imx->irq; goto out_master_put; }