Message ID | 1510947208-17134-4-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 9FF1B6023A for <patchwork-linux-mediatek@patchwork.kernel.org>; Fri, 17 Nov 2017 19:49:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90D9228EDA for <patchwork-linux-mediatek@patchwork.kernel.org>; Fri, 17 Nov 2017 19:49:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85B9B2A8D1; Fri, 17 Nov 2017 19:49:34 +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 4C78428EDA for <patchwork-linux-mediatek@patchwork.kernel.org>; Fri, 17 Nov 2017 19:49:34 +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=c4iOf6rKa2Lz+cQb35anzOT/WKG2H5zyd3gIuzOixRw=; b=QdWZGIK1k7z4GjVDyiWhnE6Mvh oA9AsJGZ60KSZ60fqz6zT8pK/tJivrnysH8z2oYcNbNJkXptE7gGsbP/R2GYnUMAmfdqKbujHDIMC S8Lhn+IACnhnpYBf2mKk7xsm0ayC97b6FvpwYnJhccwNTlJqs5USXBB5W/o8wzh4JOSVU6Ma+HLyK Y1aPLZq42fVKrgd+DkNum9zAc1nE3p8CRPRBQWiiHlRNqlcsjtzUOapT9rpazDvp/GdTLtgU3f4LR Oh5zfzT2PtKwdI8GgxwgseKq4Ye4KbCOwW4l5B5nG7sgdoncUYwzw4SFMcYOtV6WaI9I2EgjUyTS6 wpxSKMXg==; 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 1eFmdn-0000TH-SX; Fri, 17 Nov 2017 19:49:31 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFmOs-0001nh-KO; Fri, 17 Nov 2017 19:34:14 +0000 Received: by mail-pf0-x242.google.com with SMTP id r62so2631251pfd.5; Fri, 17 Nov 2017 11:33:49 -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=mCqiuS/7FzNuiS+sdALAmawvY2uvJjV2wsU4qn6Trsk=; b=WY3Ap7eWMm66U2QwptMavgik2e2E/VxWZ1OpqELAql7q7ohhtVYvp67xqEKOrsybwY eU0OiPtVuWxGg3pkHSmOTnRKzqODFx+70GU21dc8F7xB02itFASeO7XULZECkCVzddwj vT7rgBSAYySjcDs/UYhZ7Gn7i2W3wOwsLLEy0pvDtmJeW0lJ68UTkRB+F0OVelx8Zr5P pXpyXAuckJFos+PKRJRSZVYU4Tu5MNl6LN+bTnkFb6mDaxYcVy+6w6lIrKZsroTySr9D nSvjPNO13y4xWjHn21wQ2jQzqMjy2qN9yIVmpuh9Vs1xxDKQOxDo7BtIPlM0Hop85cbB rp8g== 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=mCqiuS/7FzNuiS+sdALAmawvY2uvJjV2wsU4qn6Trsk=; b=E12DsbAyAED0p/OQa6kUAlhTEE3HcqbF/NOxd6n2X+VboFYrdGB30UfPxQtRCsmz3T 9VT+7ynb/vJ1AhK+79exDVWaZJ8y8Gw7yKfZeiqFptRa99/eP8c8ov2feMFhWDu+3TmD 0TiaTzyebQly81Rqx8bWkwBcCdRR39hXBV6CiWAJkR2dJOtV8pOxcuQB05NkcO69WIVr oQ1oVMgnlzL9EzhKgrTbz3pV+uIfwxzawtZUXBQBEdJ7hv51xKQE0P/vGu5WriJCrUAA bK566CTVgQUUTa0HbZ3IcH0LvAu9BL8GpjKyNLYwUZc3gOXIfH61Z6vIs4Pddih5PwO2 QEYw== X-Gm-Message-State: AJaThX5T4tvBaoIHlrmFwMojjWDN7Cs3eW0Bu9dq92z40taLWRxHXEC9 8NeMLpDoPA6m/eiY4HJYhfY= X-Google-Smtp-Source: AGs4zMYXPPD7rMLG7rcY+l9F0bix1eEjZVhDU3oBgGtYWJWf6Y8v6AXS5m8kB5aM9SaO9XMjLXxlcA== X-Received: by 10.159.246.134 with SMTP id c6mr6191733pls.371.1510947228966; Fri, 17 Nov 2017 11:33:48 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id u77sm9066799pfd.168.2017.11.17.11.33.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 11:33:48 -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 3/5] ASoC: nuc900: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 01:03:26 +0530 Message-Id: <1510947208-17134-4-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_113407_180096_E7F86029 X-CRM114-Status: GOOD ( 11.20 ) 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/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c index b6615af..383627d 100644 --- a/sound/soc/nuc900/nuc900-ac97.c +++ b/sound/soc/nuc900/nuc900-ac97.c @@ -346,8 +346,8 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev) } nuc900_audio->irq_num = platform_get_irq(pdev, 0); - if (!nuc900_audio->irq_num) { - ret = -EBUSY; + if (nuc900_audio->irq_num < 0) { + ret = nuc900_audio->irq_num; goto out; }
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/nuc900/nuc900-ac97.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)