Received: by 10.223.164.202 with SMTP id h10csp4699907wrb; Wed, 29 Nov 2017 10:22:37 -0800 (PST) X-Google-Smtp-Source: AGs4zMZD5fa/8AejPc2ASAEU3B5ALOJFYRfRjF/X2lulCGzet2ywAX8Kcuy69SpCwCRm50FDIwaV X-Received: by 10.98.159.16 with SMTP id g16mr3895493pfe.53.1511979757817; Wed, 29 Nov 2017 10:22:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511979757; cv=none; d=google.com; s=arc-20160816; b=xoH1bixlzZeCB/4B5c6vMFY/6RT9xmj53HMr4UylxJnu57rULqlIysosSg8NYQ+Bsk XB9ZLFhgsSSe5AaHOzOLyketeetDIPHKtuJ8KBg6tFWyoFvfVd3+XM+pPF+0y5YIEuje nQf8mWU0LNehm6q0YI+V0I8YcseXqaywjO7WDm8GGw9jCpc4ejQZzI6QW4TL2q0AG1DJ AAsGQKp8yTqFW5tfzBo1RfrmSLDY5u+hRZ2BDwpWjz8WP3SvLhpPtZyW13ZADEt0f0yD BO+NZ0t6d/kSKOrcpgUOR1AdCgNn7jpIPEJeA957gEcAlVryKIey4b8wHkzAn7YNUvKL k1ZA== 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=rQGc44kobb+l9GMik1PDW2k6gDNpdeW5OHR3DsmhreI=; b=ti529z9latwHFn/WXEpI630NgwuXA8O8JTNKdEOH9cg63INg401SGKvk4pExkvAcAI hXrMMspP6zhw1etv2JWWzUFZ8AOEv4pWB3KVmMh9A8cZ6WimFkRLigDKTvP59C4/PbO5 MNfxsjcL1kIBbp7bRZr+20ETuOWybURbfAzgIz2lHkkqjRIy7G+PrkTdHJ4Bq6wR+Dmz X6pfxmZv4PfWf3l4gGtGOKWwy3+3z0IiPdYZ+a8a3VWRQCQV4Ky1R6dkvXVcXQhubSCB Oxjmwi0MNH5Mod1tz/93/QW1YRqHlgDnj9aXqrDLnPEsR5UjLxw8kQgiA6TfahSmF1PW bn4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=okpB/lwd; 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 l18si1737329pfi.159.2017.11.29.10.22.27; Wed, 29 Nov 2017 10:22:37 -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=okpB/lwd; 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 S933642AbdK2QSS (ORCPT + 69 others); Wed, 29 Nov 2017 11:18:18 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:37120 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933432AbdK2QR6 (ORCPT ); Wed, 29 Nov 2017 11:17:58 -0500 Received: by mail-pf0-f196.google.com with SMTP id n6so1767388pfa.4 for ; Wed, 29 Nov 2017 08:17:58 -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=rQGc44kobb+l9GMik1PDW2k6gDNpdeW5OHR3DsmhreI=; b=okpB/lwdEwqvkpEpANKJ1w1ieHwelMKpBzqx1E/SulH7UtcNcgGZopOzLNLDOYm1TN 7bQLJLLcj8Qs3t2H4zIVjuAeoIqA9/iV1bI11xlwgWrYWMCahMkpqb8REVcJBYdFww0f RoZjh/tyAxPVSHz319WxYfQGhRO3VSdY/BfWAVSSR+uQ19wQqZIxqPnplLzCWm5IIq0/ QSBJPPzZrKoPS3PJpnBE0+8azvsi9hW4w/5YgsWjYiGD4rc6vhjmNRrdCOEgmgN78FiO s7Rfqo85qs6tQz/GAeAjgF8+G39X6RCPqFPP+LQ9PlLqdUEZXWlnndRjCQPbHB9MlHTB OcJQ== 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=rQGc44kobb+l9GMik1PDW2k6gDNpdeW5OHR3DsmhreI=; b=Ncb9J3aYqZ1hWliG51oifflblI8UM3pv9qhIAkW3/kEsp4kKJ3HMdzpQr4g1VDXWtg yj1lRSc+t2ZuXbNwhwC6crrHo1/n4U+xuVy7unE7zT4kSXx9Fr3Jrgm2ixFnr7pCw55n qLErTsXRPlk7SNuXCQLnlrzGOiT8uFuQSSfDk2lEB/dnIvSELtannYr4ltrnomsYECqo j3tERygzRJdxaYiXYrQ2FS/AXtCvjMQjASu6yLU34RfIiE1dzAvEK75tCJAyhlYdHbWc 0jP+FQ+V6hy81bDkFlvSeOGbgLx0yjEk4H4hVhq4YPovArlz4txE5XOcEjwwrYyvitsD VCqA== X-Gm-Message-State: AJaThX5LB5oiatv+tdMOhREMwG7JIVmpHff48wuhwlYVqEMnKjrfth+G ZhakoqbCLfbBi4m2gHwQjysAVw== X-Received: by 10.98.75.210 with SMTP id d79mr3483808pfj.230.1511972277804; Wed, 29 Nov 2017 08:17:57 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id q74sm3867400pfd.134.2017.11.29.08.17.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Nov 2017 08:17:57 -0800 (PST) From: Arvind Yadav To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 5/5 v4] ASoC: intel: mfld: Handle return value of platform_get_irq Date: Wed, 29 Nov 2017 21:47:14 +0530 Message-Id: <3c83856bd9f1f23d1e0f5e8753d3998ae4785e37.1511970158.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <4ce907b8389af30eb0677e70cf543a2b795cca12.1511970158.git.arvind.yadav.cs@gmail.com> References: <4ce907b8389af30eb0677e70cf543a2b795cca12.1511970158.git.arvind.yadav.cs@gmail.com> In-Reply-To: <4ce907b8389af30eb0677e70cf543a2b795cca12.1511970158.git.arvind.yadav.cs@gmail.com> References: <4ce907b8389af30eb0677e70cf543a2b795cca12.1511970158.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 platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- changes in v2 : Add failure case '<= 0' instead of '< 0'. IRQ0 is not valid. changes in v3 : Return -ENODEV insted of irq. changes in v4 : Add separate error for irq == 0 and irq < 0. sound/soc/intel/boards/mfld_machine.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c index 6f44acf..7cb44fd 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 irq < 0 ? irq : -ENODEV; /* audio interrupt base of SRAM location where * interrupts are stored by System FW */ -- 2.7.4 From 1585436422860688951@xxx Wed Nov 29 21:13:16 +0000 2017 X-GM-THRID: 1585248952618889709 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread