From patchwork Fri Feb 14 03:19:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 3649471 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 DF6D99F1EE for ; Fri, 14 Feb 2014 03:19:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE46520149 for ; Fri, 14 Feb 2014 03:19:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F05820203 for ; Fri, 14 Feb 2014 03:19:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751374AbaBNDTc (ORCPT ); Thu, 13 Feb 2014 22:19:32 -0500 Received: from mail-yh0-f43.google.com ([209.85.213.43]:54894 "EHLO mail-yh0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbaBNDTc (ORCPT ); Thu, 13 Feb 2014 22:19:32 -0500 Received: by mail-yh0-f43.google.com with SMTP id z6so11064245yhz.16 for ; Thu, 13 Feb 2014 19:19:31 -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; bh=3IAwkTsZjHAFiFeH+R5rnDIq3Zid+6bHRd1gOCMTP2M=; b=kIaiH4FF+TrFjcw5TE/nBDyfaUx3EkKPE7KtaxRsfrRsoTrMdDzm27uCnfkfv4Syr+ nyTxhJKIQuJZxqNnDv3yLIz7Jm2LAkfRmmlW9RK8sOUb7ENZ2pjb6pWsUbmtOxa9RKWR 7zLltMzXpNn3RH3Lp2XPFT+ID6505AC0cMgq6G0HeprKr83TdylPoILp+lmEwrO3HUM4 FptB6jDbnxGN0EwmDOK+xtqglur6A+/+5LdNCYNebjjkNpabfGvagaDOukQTrlCPqR9W Y2zpgTAoZhP2AEd8s1OY/6TtiEVMEoBBCTzB0ANWkQSQq6y5LnTdNwc6Wr8bzlajTgiU UxlA== X-Received: by 10.236.98.39 with SMTP id u27mr4785521yhf.27.1392347971708; Thu, 13 Feb 2014 19:19:31 -0800 (PST) Received: from localhost.localdomain ([177.194.40.80]) by mx.google.com with ESMTPSA id h23sm12581376yhc.0.2014.02.13.19.19.30 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Feb 2014 19:19:31 -0800 (PST) From: Fabio Estevam To: broonie@kernel.org Cc: marex@denx.de, linux-spi@vger.kernel.org, Fabio Estevam Subject: [PATCH 1/2] spi: spi-mxs: Propagate the real error code on platform_get_irq() failure Date: Fri, 14 Feb 2014 01:19:21 -0200 Message-Id: <1392347962-9835-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.1.2 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-mxs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 4208f24..2884f0c 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c @@ -472,7 +472,7 @@ static int mxs_spi_probe(struct platform_device *pdev) iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); irq_err = platform_get_irq(pdev, 0); if (irq_err < 0) - return -EINVAL; + return irq_err; base = devm_ioremap_resource(&pdev->dev, iores); if (IS_ERR(base))