Received: by 10.223.164.202 with SMTP id h10csp2350505wrb; Sat, 18 Nov 2017 19:57:50 -0800 (PST) X-Google-Smtp-Source: AGs4zMbhgLyZrv3n4ZS1ht72YNlHY62AaXI1vXAtLQAhXpawYZ2tVZTvoHYKV4xh0Mu3gKmsuaNA X-Received: by 10.98.58.29 with SMTP id h29mr7029278pfa.121.1511063870057; Sat, 18 Nov 2017 19:57:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511063870; cv=none; d=google.com; s=arc-20160816; b=fuYgFb92Xu9qJ78ZU1YQa9bmTo3AOmKWHY8lRY0UZ+DHaPiGDCc8/mliiaf7jDYZ9v T3M3r64JBxihfjVaJdOuWk/darOZikbjr+RiAAaQ6ABfulc/amVYaB1pfueVe5P+4L1G 2dvjjtS8LLcFefYMkdeMa8jwdPm+CYfb85StIHMD3XFiaauWZ/3mSpp68tx3whY/nlxI DSt2eBYN2RuOoF37Oe/YlN4yvYLpBMBLQ8ORKkfzIQLQqsEjwm5juqnO1whpcjzRxUmc kmUkeV1F/q1p20akr1Hwy/i/Lus1UoFrTH6TGt9WjRBvQbMxcztchWgw5wKwhFcHE5P6 Sfhw== 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=M3b5gEky/Cc4XvgNLS7kI7lwaQfU1C3m+0qpVcLnYh4=; b=EAU22aJRf6s4t2v1xhnari+1Kj9e7zAWEnvS+EjD8Cw8fw04ukJTmkz/NNkhaTmFxR 96x9i4r8zHkqLFQaHSjMPp+Q3/Xn7fDL0sc2sRXHjkzp7eNV0AZAspYKZVvL9CLH3ign aqDmbB8GJFVOa700yVsFXVGe5NpKdZb0kzcL3zSPPOYNyVCEG8H841DzkYwy/a2Efrnk wtGhblMd2/JzVmx4TxGF7Ng9tXqAffBo+ZSsAEEzUuHyyvX8V5hKKXy0xi5QEVZwG8hB xd0RLh8m5M37cj7sWYF0H2iPnrXEm3hqVy7TwPX8mVeMYvPmeuaTPx8jhK7eDek8kCJA 8QbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uqcDD01w; 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 n187si5943652pfn.150.2017.11.18.19.57.37; Sat, 18 Nov 2017 19:57:50 -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=uqcDD01w; 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 S1163478AbdKRJ55 (ORCPT + 93 others); Sat, 18 Nov 2017 04:57:57 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:45845 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163419AbdKRJ5O (ORCPT ); Sat, 18 Nov 2017 04:57:14 -0500 Received: by mail-pf0-f196.google.com with SMTP id 17so3742066pfn.12 for ; Sat, 18 Nov 2017 01:57:13 -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=M3b5gEky/Cc4XvgNLS7kI7lwaQfU1C3m+0qpVcLnYh4=; b=uqcDD01waABaZdC0vtDO5t8n5fU/hvH0BRYFsma7YqcNZdE9z1Ol5g3A9SwT/NdEd6 qVdUv/YBPNZ464U64m2V0sG/5aBarlX82II7Qiny/h7pDd5S2W6oC+Vjhuycfh/wNHBm NHcBCGIk+dC6Y5MwBA9bv47sXpepXnH527UxBrv94deZZkIcR20s3yDLdEZI4rat/XA2 5efUVLJwIgb8Z8DykQnXvBt3BortC8GH8nUE72H0DbiQ45md3fYeeqd9bBI8+cg6BE1+ FPjC39TVKygAca1tpZrfEpYASyFu4GjWcqLS03u6I00XSroO4SV8KY3KS2q/ZOEE88+N wfyA== 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=M3b5gEky/Cc4XvgNLS7kI7lwaQfU1C3m+0qpVcLnYh4=; b=G/wgnuOnT1mdf4ujxv+M447uiDyQT8OITPJTY2w9B8rvQB/i3suHTiysxfLg7DP7Gy gOGebERMjEBPDt4jsmPqBaDCN0DXQD8EdLJwUtFHlc2cn3oDHvfgQQYx/FZ1EpQkh26k ycuLNvQ0ceCeOWpKnefOx0YMREnNbReZ+vEyUuvmspHFDKtVahPu81hoNb5QRmDXIYv+ QHH+5sI7zxK/Dm5BgP6KDxXP5J6MibHypaHcfSox7yO7AoCR43y7WGFXql7sICGscFGU d0AN/TyZWzRZj78fido+eXw8qIk4fLpiOkqnUdLT14hsGMLIKxVhDqV8/JhoxCYDFIbf JIOg== X-Gm-Message-State: AJaThX7iP7rEM59lYD1NKs89waNOytSnfClnl2BTpQDCYm2HRGgVu8Co cJWIdMuA7SaO/kWEAZzYLY8= X-Received: by 10.98.80.69 with SMTP id e66mr4943713pfb.112.1510999033609; Sat, 18 Nov 2017 01:57:13 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id r16sm8862577pgt.72.2017.11.18.01.57.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 01:57:13 -0800 (PST) From: Arvind Yadav To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com, linux@armlinux.org.uk 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 v2] ASoC: intel: mfld: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 15:26:49 +0530 Message-Id: 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: <37f7370f99f4efa12f92eaeada72ff511d409fa6.1510997815.git.arvind.yadav.cs@gmail.com> References: <37f7370f99f4efa12f92eaeada72ff511d409fa6.1510997815.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. 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..77b3162 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; /* audio interrupt base of SRAM location where * interrupts are stored by System FW */ -- 2.7.4 From 1584416137433910311@xxx Sat Nov 18 14:56:16 +0000 2017 X-GM-THRID: 1584415759222250809 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread