Received: by 10.223.164.202 with SMTP id h10csp1381980wrb; Fri, 17 Nov 2017 20:42:27 -0800 (PST) X-Google-Smtp-Source: AGs4zMaYP18z4YwCIDZP2u+oXmjH3aXZqBM2HULChbbqFA737iTnOaD3mJDEV4/qXn+K6UWpVWm0 X-Received: by 10.99.97.200 with SMTP id v191mr6856082pgb.300.1510980147415; Fri, 17 Nov 2017 20:42:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510980147; cv=none; d=google.com; s=arc-20160816; b=e4VpRnTh3I8JsA09UP0QIJ6wj9oClIaklLI2lBaycaXpIrXHbkHdnDQMPej7FENCr1 XFVqr0HuACxjAbp+pYaC2O/HBioD5ih5wIAYIf0uIGGRPnrCavZuukoOoJn4YDTYRchQ Vfbivm6oMjTDrIkD67R85L3ueLodZqYHTnU920s5ZEzUaLtXPvps30WKDng35OOOXOgO FJCLvwOAn3DmfsELMn+i9CyLWpyvcglEFDz1pqL4JNTSu1zDj2b/spui6rzXwcKoDeek H6jstqhj8f9/pPWG0FEKLa1UV5VmQqO4rLFJLDBSNHRKTo7tcfnZ3d7V2QsIT55LIcMm mXQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=5YcM2cqF6Uv6fLwcPV++pGlp7YT68svi0KF6nIx3Blo=; b=hovFU4ZCUyvfuF1EJ3MeWXio2PNPvRwKu+MmtjXlVVF111wAMY8LaKUMBpzxo6szwa NRo0fChDYC5GcmMj6/cxCBkTDJ1V1mgeBwuM2v9RYxmco61UCe3MrCjbhl0dZ0kYoGCM O53a6+XAIPEP9FjDD7ao1jYkZJGgpQckN7BWMTNZw5nBvKAUWRqhUj6hgmGe6Q/K//4Q SLe3IPgfxk4GdCyTnBRfEhhTRyJcPC2K+Kfl2SMeeuOEZMqTjEgVy1U7qx7vCLKTfYwr xyX8fXq70frW+jJHGtH2v+4AabMAfIzvPQU/I9fIjrUS0y1/0P3yrw2Y1jswMD0Ej3pt upLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=po8jgRsi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a63si4002875pla.727.2017.11.17.20.42.14; Fri, 17 Nov 2017 20:42:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=po8jgRsi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935104AbdKQTeL (ORCPT + 93 others); Fri, 17 Nov 2017 14:34:11 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:38125 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934165AbdKQTdq (ORCPT ); Fri, 17 Nov 2017 14:33:46 -0500 Received: by mail-pf0-f196.google.com with SMTP id r62so2631156pfd.5 for ; Fri, 17 Nov 2017 11:33:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5YcM2cqF6Uv6fLwcPV++pGlp7YT68svi0KF6nIx3Blo=; b=po8jgRsi+wX6rQfwo+WFoyRyap7XOtKUC1St6R2HaKvE/hVTOMjZODTQqBlIdxyEba ppQITEEc0STK+FD+UMZRLNMFb5AJfXEJcXMQvdyXjseDVI3f2emPAFIo0B4w7Ie3NQAW OaBPS6+X8boLUm+pau6vGrMdqrlyXJNoGkH9wIuLrp2Ml0AZwBZrVtVU0/JSgRqwY+Km uIVevd/DJDGXwK8XDcF55JIvA9Fu7W98Kqtu7C9ugmGnC1gnRL3E/792farXDO7f82g7 eVfQAGkajr/Uh7ARqsjWotNrwwW+UqaneFfIJSULiBlwoqDcGu8VW5Tpzzy1b8EUjdQG xqEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5YcM2cqF6Uv6fLwcPV++pGlp7YT68svi0KF6nIx3Blo=; b=Mz1Gl2AL6DewsgTkWYChjuDEVp3obMYEvf51nCb11Eo2x5LzWOz2yv5LTvIc2K5uFw zz2FzRmQ6GbOhzWGAWBURZQY9vjV5r6sQh9xH2lgcH3y0/BVRqX95hlGv6d2imVivNoG ZFb5q5iVUfQ70ZuOxlvU2RBqxKPNjmUm9kkQlQp8rVMT6E17ms4XDCg7KzlUgtQMw9IU zCCwyzRGxZNT0xyo0g3/M4xHaxbJFv9j0nBKyi38iMCxyPDSJUVbPYS4sdU+Z7iP8DWf DCr4WP/MyP5HpCEtt78et3erlEOAoTp1HsjcYi5DKL11FVPln6CPXQuEKZLIxNWmT9S2 6rKw== X-Gm-Message-State: AJaThX56DMYZG+YDtAL+cL9HKL/pbyLV7J11Z8hYWuXQYQ6yZIjik1qv G8Nwhf2ypfHAZ513FGX5HSo= X-Received: by 10.99.60.83 with SMTP id i19mr5941750pgn.26.1510947225972; Fri, 17 Nov 2017 11:33:45 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id u77sm9066799pfd.168.2017.11.17.11.33.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 11:33:45 -0800 (PST) From: Arvind Yadav To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 2/5] ASoC: mt8173: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 01:03:25 +0530 Message-Id: <1510947208-17134-3-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510947208-17134-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1510947208-17134-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The platform_get_irq() function returns negative if an error occurs. zero or positive number on success. platform_get_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav --- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c index 8a643a3..eee27bc 100644 --- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c +++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c @@ -1105,9 +1105,9 @@ static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev) afe->dev = &pdev->dev; irq_id = platform_get_irq(pdev, 0); - if (!irq_id) { + if (irq_id < 0) { dev_err(afe->dev, "np %s no irq\n", afe->dev->of_node->name); - return -ENXIO; + return irq_id; } ret = devm_request_irq(afe->dev, irq_id, mt8173_afe_irq_handler, 0, "Afe_ISR_Handle", (void *)afe); -- 2.7.4 From 1589925072500737727@xxx Thu Jan 18 10:18:26 +0000 2018 X-GM-THRID: 1584611025910997874 X-Gmail-Labels: Inbox,Category Forums,Downloaded_2018-01