Message ID | 64135c4647a3a94261a669d7f49611a356f334bf.1511062844.git.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 170F8602CB for <patchwork-linux-mediatek@patchwork.kernel.org>; Sun, 19 Nov 2017 04:19:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 053B32952A for <patchwork-linux-mediatek@patchwork.kernel.org>; Sun, 19 Nov 2017 04:19:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE34229530; Sun, 19 Nov 2017 04:19:16 +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 B3A4F2952A for <patchwork-linux-mediatek@patchwork.kernel.org>; Sun, 19 Nov 2017 04:19:16 +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=IgrOn34ErIDm34/Zx/r4IzA6WSORA9lDDJmdx+Idg/A=; b=o2t7ld2+bkkjYPGvBtT6DhrYeS RLh6Ls+itLHDmj5b4qdHrOXVzN6pJayhFINb+fOsYppdMoNhKVO3VvC7yYcDYBa6ctDpxEEqdNAcP D4bOMdVpryktkrjmt6xUDUsY2aEccr+lNdBI0Ed6RCiX7+Eb6sBR3wq1/zI90phoxs7sUZhqTk4d+ 5IzBvVOFz3iTVcbUuTl0Rwv5qMajF+YHOWj8U4VLsEX60EofW+EBiGVbPPR1b/R46g4LaNLD14b7o ojVtsWM4TjjFFKJEPkmRlaz7gTVpj/Ktk70ZG2iD1KiZJke/ABtRub/HQrqXhRoRgiIr/ipGD1v5T cIYPk8YQ==; 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 1eGH4d-0001W1-AM; Sun, 19 Nov 2017 04:19:15 +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 1eGH1N-0007dn-F3; Sun, 19 Nov 2017 04:15:55 +0000 Received: by mail-pg0-x244.google.com with SMTP id r12so4838430pgu.10; Sat, 18 Nov 2017 20:15:37 -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=BuTlyBagUcsEkgcgw1Bv9Xk29Gbc9jafwwLYtOfW5Wg=; b=eoayeiAdjNg6Zi1Oz6diqi6Mn069LfEFr1M6/VoEjrBoGGnt/57sPlykroHd250VU9 Y/SHWFs5qhap6YNijVzmDcVIuljlHW9oc7UM+G8NdD9er7chfe6bt23jWxMu3vFHShZO P3lxIpLFj8pE/kN7qrB762JMzEUH9GLYFJnHXy+LJvhH54mL1jx1TjxU4OL4mJ4bzzS8 wbf3j2a4BIbLP2ZCFdygETvMDgwzZJ27YD+INv+KAE/y+xjT8o6kEuGdlx7M9XGCfbUQ 0O/Z0jED6CUcMyIzg0BrbGrrDA7cp04aGn9WCbtO8sAxTev4UBtTw/ilxtTlqkLt8nFC Hu/A== 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=BuTlyBagUcsEkgcgw1Bv9Xk29Gbc9jafwwLYtOfW5Wg=; b=mu751k/dS7hr7L0bSo9tmQZFilZKMDzDb3LXY5ZL7BrwgyOQ3ObbPU32xDTxFSIJTi gAqlEEaceT6rkpoO5+7GsmaOnMCKfCm8f6YIBwV4K2WHWkj1IucOamWUIjeeD/hqMUKW +Zy1QEolhewO0ongWIXLCfGq+5yGE/fSaKH544asFf1fVVkT1a4yTZS0f2r9W//n7/N6 sHk2kgXDkMG6ne/JTJIpOvEjCkPw05HWiNQ/4ggPT4aO9kQ9TzK2VlkOsxm1OgTYb8/J /zXXfmcb9zBFGc2TMuo4qfnOFO5SrYzLPyEybncgMdX4U/ENsQfhZMrgsjVm5cle8rig hvOQ== X-Gm-Message-State: AJaThX72zzxjS4cFSEI9z9xzp/u35Y50U9S5XOnkJRp9tUgmyhTfmFWp aHQyi/uikkNWr5KSJIobfjA= X-Google-Smtp-Source: AGs4zMbMUAo+hXwyrFZwGPSUZFFIsq4L8XteVAbNlmbtVSyktY4SN+QWvheprnlEq50TFWVBX7opHA== X-Received: by 10.98.76.206 with SMTP id e75mr7088024pfj.57.1511064937049; Sat, 18 Nov 2017 20:15:37 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id l14sm12741475pgn.35.2017.11.18.20.15.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 20:15:36 -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-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux@armlinux.org.uk Subject: [PATCH 5/5 v3] ASoC: intel: mfld: Handle return value of platform_get_irq Date: Sun, 19 Nov 2017 09:45:04 +0530 Message-Id: <64135c4647a3a94261a669d7f49611a356f334bf.1511062844.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <082d4479211d425219f4ab275ecc12e1011eca2f.1511062844.git.arvind.yadav.cs@gmail.com> References: <082d4479211d425219f4ab275ecc12e1011eca2f.1511062844.git.arvind.yadav.cs@gmail.com> In-Reply-To: <082d4479211d425219f4ab275ecc12e1011eca2f.1511062844.git.arvind.yadav.cs@gmail.com> References: <082d4479211d425219f4ab275ecc12e1011eca2f.1511062844.git.arvind.yadav.cs@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171118_201553_579638_584EAD0D X-CRM114-Status: UNSURE ( 9.27 ) X-CRM114-Notice: Please train this message. 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: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.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/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c index 6f44acf..c819210 100644 --- a/sound/soc/intel/boards/mfld_machine.c +++ b/sound/soc/intel/boards/mfld_machine.c @@ -372,6 +372,8 @@ static int snd_mfld_mc_probe(struct platform_device *pdev) /* retrive the irq number */ irq = platform_get_irq(pdev, 0); + if (irq <= 0) + return -ENODEV; /* audio interrupt base of SRAM location where * interrupts are stored by System FW */
platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> --- changes in v2 : Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid. changes in v3 : Return EIO insted of ctx->irq_num. sound/soc/intel/boards/mfld_machine.c | 2 ++ 1 file changed, 2 insertions(+)