From patchwork Wed Apr 15 03:08:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 6218651 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 385F99F2EC for ; Wed, 15 Apr 2015 03:10:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6E25320379 for ; Wed, 15 Apr 2015 03:10:17 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4A58020375 for ; Wed, 15 Apr 2015 03:10:16 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C76D126548D; Wed, 15 Apr 2015 05:10:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id CC7CF26545B; Wed, 15 Apr 2015 05:10:04 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8CD9026545D; Wed, 15 Apr 2015 05:10:03 +0200 (CEST) Received: from mail-qk0-f179.google.com (mail-qk0-f179.google.com [209.85.220.179]) by alsa0.perex.cz (Postfix) with ESMTP id 405912605BD for ; Wed, 15 Apr 2015 05:09:56 +0200 (CEST) Received: by qkx62 with SMTP id 62so55271988qkx.0 for ; Tue, 14 Apr 2015 20:09:55 -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=7fWeae1t82j/l30Q9nGvlop4x33r6hdsEfi+tWvt7o4=; b=leF7sPNxXRcTTJZ9eTSczyl0nEzN1k8xh5p7gpC/8guuOOt9CiEyK4nLPKbIcqAxcd SuPDB5qVXsh8OZGAbVKw6iMlQnK6zsIFyHqUnYGL5peyagYg0IURIYS3T808rZ9/A9/1 c4Ha6UILbWE17YDaG4IGSqghTMdulz5mL130+CVAS329hs/jvtSy/C6UkJUk3jOK+0wJ Pvg5RP5m50kTcfL1p/rY2Ib9QD8gq60Pv9BGz2oUClZMfCu3JrXuSrfE/9d2OYqyt3MB ooFKKDs3eCP3ITUi1/gC2/lPZCejLIkwnD2eCegzYyS0WU92DNiAKsu/mjn6vMnRspne V50w== X-Received: by 10.236.23.136 with SMTP id v8mr14595609yhv.194.1429067377407; Tue, 14 Apr 2015 20:09:37 -0700 (PDT) Received: from localhost.localdomain ([201.82.52.181]) by mx.google.com with ESMTPSA id d65sm2351776yho.40.2015.04.14.20.09.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Apr 2015 20:09:36 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Wed, 15 Apr 2015 00:08:15 -0300 Message-Id: <1429067295-16052-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: nicoleotsuka@gmail.com, Fabio Estevam , alsa-devel@alsa-project.org, timur@tabi.org Subject: [alsa-devel] [PATCH] ASoC: fsl_ssi: Fix platform_get_irq() error handling X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam We should check whether platform_get_irq() returns a negative number and propagate the error in this case. Signed-off-by: Fabio Estevam --- sound/soc/fsl/fsl_ssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index e8bb8ee..0d48804 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -1357,7 +1357,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) } ssi_private->irq = platform_get_irq(pdev, 0); - if (!ssi_private->irq) { + if (ssi_private->irq < 0) { dev_err(&pdev->dev, "no irq for node %s\n", pdev->name); return ssi_private->irq; }