Received: by 10.223.164.202 with SMTP id h10csp2277226wrb; Sat, 18 Nov 2017 17:54:51 -0800 (PST) X-Google-Smtp-Source: AGs4zMZJ0IlUihTO8vdvfXYHvqHl8+pFbTC2iC0uSE7OAT7PeC6tVv4mjtzqkjdWXSA5nrFa9sBl X-Received: by 10.98.19.202 with SMTP id 71mr6778355pft.181.1511056491627; Sat, 18 Nov 2017 17:54:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511056491; cv=none; d=google.com; s=arc-20160816; b=hY+YMfdLnn4ATsEGckoqSJnmtd8W7DH/YQsVrrBUhFzVFuGXLdWe9eMhTzky6d+x7z O3f38mpZMRppgTMf3sJUvweLdQllCZIzT0MXkn46GWGGwFyUx6mrxSO2BFYl/jPwzVmt u5il6rX2CHiPi56dQehJ6f24iFqJvuf/gF7JBWUPeK+KiCvtQ/KwRD9/CvSKAONvSD2U 3w5Ro/6usOCKypKyAtQ0dhc/xBt1Y9KlgCmcCMY2HTza6cVUdsw5RTMpXYl7naOkoJ6A 7lyrYjHH1sAOhmMlq2uj919KJOE9+WOKAq/uKPZ5aBI5TPi2PXm14BJ15c6bNSHpohVa 5XfQ== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=BtRkELvfOnYoChNIuqUF54QmFJgtFbXGfCcUvi0KX10=; b=turchtu1+DcB3WjIk8B8swqGVxgAtaXRosmsKmjQpo/4GlhZ77/6Ir6POSUgmMvOfV 08uCxSTYQpVtC/7xpmUydUA5HG/FEFSlbBP8If2bMoDU+MgiR5dMK1soVFSBmKaGdQ6V 8kIEOV1cnnqNHQ8eLTBVNLBy7wgwNjYYHMHh+fme2g1fJ0SipJYRKaDCryBdspw/KKZU poP7+F/uNZjm3BmmJtrfsMAekN06g/xA8FJT50OUjdKzQdzU+hI7YkAXi0v27IfTnzg6 GQjvre80yI5oJrd0qCNLxWMeD3Q7l+XHyMhtB+m32IXKtd0xEo7seOsxEtaqtj4WgJJM dtlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OELNza0r; 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 t8si5351095plo.439.2017.11.18.17.54.39; Sat, 18 Nov 2017 17:54:51 -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=OELNza0r; 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 S1030279AbdKRF2a (ORCPT + 93 others); Sat, 18 Nov 2017 00:28:30 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34626 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935481AbdKRF2K (ORCPT ); Sat, 18 Nov 2017 00:28:10 -0500 Received: by mail-pg0-f67.google.com with SMTP id 4so3489278pge.1 for ; Fri, 17 Nov 2017 21:28:10 -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 :in-reply-to:references; bh=BtRkELvfOnYoChNIuqUF54QmFJgtFbXGfCcUvi0KX10=; b=OELNza0rJEWWkX/ZjnvoPSoN9udnxGAhmjyrATO2FUoxtZKzLgd11fdnoIJi1hwtPi q0gyedbryflRHfb6CuA5khwPyu6Ki3w3j+EOB+4PP/R6bKGjFKXhOTvpcsEDResP/m+o bC44Cqf/1L+lxPLpCmQeCrX1VXES+Ij75kPAE2W39a0loIf02n0J7bef1MDM9iWb3fw+ srz4GTeRGFF/v5dfuKl54d3w8u4PekP68nWhVjMYJVsf2r1ixLzm9S59xDUoCdrY02wC fYnfHSD9ZV5yi/JLOovbPB5spbyyX1Tje2GiIGoDAaIzlr4sYuFCPSOpvvKG3MASGN+K pSwg== 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:in-reply-to:references; bh=BtRkELvfOnYoChNIuqUF54QmFJgtFbXGfCcUvi0KX10=; b=eeZyeayq9ith/EuR68wO7QWHKbNIGSWv5/A364uPeRtWa/EEfm80TRZeElQthJOI7q +AhHjPdMvHuC9j1KmEqeJFuAl0hzi5UU/64nX9SFS168yfKJEMeSI1kf5udVUDOrUP5K O63hT+fjLuIFowppg/gqq7zYYFB2QP4xzDOQkOmAqxWj/Tbp1lcgXYabDwotga68j5UY XZ/tiSREuT5vPNOFkZMpmpaMLJhBTXQ/YIVlWRzb1uZ9zC3K+Plof0qKR/SAwghWTpQj cXgnbEoXZdFBs3fpdeni9sDeGsd/iS3DDqCfGwXSpnA8UXJLSM7vYRIiBhzQb75HN+fK Pj3g== X-Gm-Message-State: AJaThX7smk2Mxf+ZnqJG3JcLo3SrhxWS8kdrGE8A/1VYqQig1yllzop+ uqq+QM2pgNJfrjYDlpQAmP4= X-Received: by 10.99.96.195 with SMTP id u186mr7025264pgb.298.1510982890171; Fri, 17 Nov 2017 21:28:10 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id d15sm10559781pfj.163.2017.11.17.21.28.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 21:28:09 -0800 (PST) From: Arvind Yadav To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 2/5 v2] ASoC: mt8173: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 10:57:52 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: <874375c0dca41790e47b60ce30f88ab353f97b38.1510982440.git.arvind.yadav.cs@gmail.com> References: <874375c0dca41790e47b60ce30f88ab353f97b38.1510982440.git.arvind.yadav.cs@gmail.com> In-Reply-To: <874375c0dca41790e47b60ce30f88ab353f97b38.1510982440.git.arvind.yadav.cs@gmail.com> References: <874375c0dca41790e47b60ce30f88ab353f97b38.1510982440.git.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 --- chnages in v2 : irq_id was unsigned. so changed it to signed. sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c index 8a643a3..11f5f2a 100644 --- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c +++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c @@ -1083,7 +1083,7 @@ static int mt8173_afe_init_audio_clk(struct mtk_base_afe *afe) static int mt8173_afe_pcm_dev_probe(struct platform_device *pdev) { int ret, i; - unsigned int irq_id; + int irq_id; struct mtk_base_afe *afe; struct mt8173_afe_private *afe_priv; struct resource *res; @@ -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 1584377519151698875@xxx Sat Nov 18 04:42:27 +0000 2017 X-GM-THRID: 1584377519151698875 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread