Message ID | 1510947208-17134-3-git-send-email-arvind.yadav.cs@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5FA4F6037E for <patchwork-linux-mediatek@patchwork.kernel.org>; Fri, 17 Nov 2017 20:03:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F27B2AD75 for <patchwork-linux-mediatek@patchwork.kernel.org>; Fri, 17 Nov 2017 20:03:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 413752AD7B; Fri, 17 Nov 2017 20:03:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D587D2AD75 for <patchwork-linux-mediatek@patchwork.kernel.org>; Fri, 17 Nov 2017 20:03:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=HV9yf56KdczwA8HZQiWAzjGJr62h2342R+WjNpmIEGQ=; b=AnsM/vKqZSuskoVxk0PQy28Rmx Fctxjb6sYesCNhQclJjm2vLF0hatR9mwQGuBRKH5jvJqzPVjwcouXIGXFNXFIr/JsrMMmT76EpAvJ Pf4wOq6sRVDs6tCjLs2+sbyJnd0FnDc9I4DgHZNCebEHXYQsrQ9ZGWF6+1gROxHUXguZTr2RnENiO dXcT1iGBXwlFeswhQ1lQgZWDfCD92gOaHKl4wu0nZBKpPIKyJVQQ1WfHTW8yIHL4bGaUZT/+zb1sF +NGJ+cuS5QYgy71k9fYuHj6sJYqGmRmbuoBBm7Di2gGLd77WRA6kryXncCEkv54/pNd4i9u/Pay1r LzUa/avg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eFmrc-0001eA-NQ; Fri, 17 Nov 2017 20:03:48 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFmOp-0001mA-PH; Fri, 17 Nov 2017 19:34:11 +0000 Received: by mail-pf0-x243.google.com with SMTP id l24so2628835pfj.6; 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=HtR9tRmpVq3GW42hwlad+016EHTjlxrrwMGFXnpjRP8th4uyUqDQA+rgVxbaQzIfdz MdroZv696Xv6nW7q4Jr+YMJhJqCuf7Wk8sZCFLepTq4+kfS5w24MFigHWs+scYdT1Sxf X45Na8rpEe48brvsbm+4QGUbBMvL9phshSy8IWUzk8veLNjAIB3FA5BktVc/TsIMWNci P3x+pZyO5BdWD+OLEohlwZX4rsNCBLNHlxMEQoctlr3kCbXXGnYYn8Tv1IMDWX7a8LhU j6trCh4mhhZc4NsfxoCRE00rd053WksIuhoiWYpW539L02NEISvQrTdYfOIpt23V29It 1NaQ== X-Gm-Message-State: AJaThX4rC/PT8J1OVK/ln06RcPIFi+w1enctASnnMc0WM3GvlCgnTtWY Sd08pydCwVzU6GmrBBuqaz4= X-Google-Smtp-Source: AGs4zMYRIE30rpKvDTr6We2i20gB8ajSoh8GbG/dIPXZ5Inm2Q1HlWkmvJiSh2/3KO1fjOhhbkUX+w== 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 <arvind.yadav.cs@gmail.com> To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171117_113404_319988_679E264B X-CRM114-Status: GOOD ( 10.77 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-mediatek.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mediatek/> List-Post: <mailto:linux-mediatek@lists.infradead.org> List-Help: <mailto:linux-mediatek-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=subscribe> Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" <linux-mediatek-bounces@lists.infradead.org> Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
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);
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 <arvind.yadav.cs@gmail.com> --- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)