Message ID | 19f8c64a4720118a6d6c4fedd5f8defa6938d1db.1510997840.git.arvind.yadav.cs@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=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 AC8786023A for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 09:58:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C2E62A304 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 09:58:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90C962A895; Sat, 18 Nov 2017 09:58:03 +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 2F42F2A304 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 18 Nov 2017 09:58:03 +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=EBpR5ufibcpHj/mceqN3v20VnUyUhYVPHR4EZKKgJ2U=; b=McK/RHjsVmFA5j4m2ZVo7SV3Ht B7707Csl5Kidl4vd3YybQyCdDXXz4MNkntH8UCeNOxirUIC9qhW3JIsailsRbpyW/cLzfqNMXS7ey vTMPfWMroiv8zpltg0eIFCX6gWNeIF8Ao7tYVKnSvlFr3w+r0laph/Yd4Fesql5HLKoxaOQjdwUig 53HRj2PviaG7/RpylCrgee7/MXOUZL/Z6pTmDxkG/eF4y7vnxkvnQQae/dPJDa1wdikjhdZhuIvvP 85d6mWAGIho8yIeBtEC5tNA6aycXOHFgJUIV5Zqi6GkoaGjE46rqPPkrKs62DMl9Ck9Njv1TmQEOn qIKxy5ow==; 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 1eFzsp-00034a-9L; Sat, 18 Nov 2017 09:57:55 +0000 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFzsN-0002ct-ND; Sat, 18 Nov 2017 09:57:32 +0000 Received: by mail-pg0-x244.google.com with SMTP id p9so3772214pgc.8; Sat, 18 Nov 2017 01:57:07 -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=wmra2QTGmAOddIpAWmSYeAc5m2iInXMIWfeyNphXS40=; b=NMJPBJXF096Q0wPole5dzBYviUV8RWeIMe3jWVZa0+NAb+n/UeWau5BAVNlkAEjt0u w0xj66RFUdIfD7BCxmAGb79pRWuupagbkwcbW7s3Khue1qkHVJDk8vz2PGzHxmPsowm0 /vGmoNYngYcwnIrBDMBFNOyEkg00xKB3Sr6mzk8dce+VjaPRjcfdzfFM5crECHng/jhh JT2RzBsWYaRnEmh6k6C6qPVKaFiEmDGhalwOCCxUw86/myHUpGFp5RU2bQCbKnIEJQKv OWXrM67Lh3FU3z2FGhbjKf9GL2eixXvhaVbq/70T9bom9zOsfGGidwMoGywhFmri3wAc f7gw== 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=wmra2QTGmAOddIpAWmSYeAc5m2iInXMIWfeyNphXS40=; b=EXdd1/C11puKjF0OWlo9xcWOMgfyxpM4JchTaSNLyFVZQ6dyMFHkiP4tnYBPfO2XjX rasD0U6oAfiaDFV7AfASer/fcjHtBngu9YyUe6B0k37PbaSfA6lcGCdHtyLsyp7Hy7o+ tJFjbqwNJOq3/4ESpzQ1DCpM5p7gvYVcw9GXnXB8r4MyEoG2BZ2L3R7qLURsBcbhz9BJ kBykOLztmLCu3eIqjdJEneO2XdZx4nlZAVjSQXQgZU/vrs6amnFhKYvysDFeTA7yocpI lNZVbxVIw5Ps7tLuZ5opqNDgOLUQ2Mge5X2WCMUJC1vJuorwytL4l3Z6F1rosKkUedV8 GJJA== X-Gm-Message-State: AJaThX4n9x82DyblFLr6x3TNf/Csx8jL3/NBH79tc38ESXTkAGYBAlU+ eatEGb3q818vxcm+a5TcwII= X-Google-Smtp-Source: AGs4zMaS+vH92Mh7UIxEmH7vfnc34TLFpcI3zQfRDWYbqyX3eQ3pr6szj7Mm/VWMR6vlp5i0An6bjg== X-Received: by 10.84.240.73 with SMTP id h9mr7974758plt.388.1510999026616; Sat, 18 Nov 2017 01:57:06 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id r16sm8862577pgt.72.2017.11.18.01.57.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 01:57:05 -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, linux@armlinux.org.uk Subject: [PATCH 3/3 v3] ASoC: nuc900: Fix platform_get_irq's error checking Date: Sat, 18 Nov 2017 15:26:47 +0530 Message-Id: <19f8c64a4720118a6d6c4fedd5f8defa6938d1db.1510997840.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <874375c0dca41790e47b60ce30f88ab353f97b38.1510997839.git.arvind.yadav.cs@gmail.com> References: <874375c0dca41790e47b60ce30f88ab353f97b38.1510997839.git.arvind.yadav.cs@gmail.com> In-Reply-To: <874375c0dca41790e47b60ce30f88ab353f97b38.1510997839.git.arvind.yadav.cs@gmail.com> References: <874375c0dca41790e47b60ce30f88ab353f97b38.1510997839.git.arvind.yadav.cs@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171118_015728_158628_9BCA5824 X-CRM114-Status: UNSURE ( 9.21 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: alsa-devel@alsa-project.org, 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-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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..71fce7c 100644 --- a/sound/soc/nuc900/nuc900-ac97.c +++ b/sound/soc/nuc900/nuc900-ac97.c @@ -345,11 +345,10 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev) goto out; } - nuc900_audio->irq_num = platform_get_irq(pdev, 0); - if (!nuc900_audio->irq_num) { - ret = -EBUSY; + ret = platform_get_irq(pdev, 0); + if (ret <= 0) goto out; - } + nuc900_audio->irq_num = ret; nuc900_ac97_data = nuc900_audio;
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> --- changes in v2 : irq was unsigned. so using signed variable ret. changes in v3 : Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid. sound/soc/nuc900/nuc900-ac97.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)