Received: by 10.223.164.202 with SMTP id h10csp2350933wrb; Sat, 18 Nov 2017 19:58:41 -0800 (PST) X-Google-Smtp-Source: AGs4zMY0q1wMdfkkklHMCjaY03SNxWNUk6I4VAhcGfhE6A4cEQa9PywQ3Y+gFM296OWAQHGhNBsx X-Received: by 10.98.18.157 with SMTP id 29mr7041140pfs.84.1511063921837; Sat, 18 Nov 2017 19:58:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511063921; cv=none; d=google.com; s=arc-20160816; b=Wvo5pGSc0L0WvxyaRZrXKaw0ZrvASLyMlZF51xPJ9k65eJF7XsXDA+Wf9X1o17hAMM dqDb73sUmR1UM7TJqIAKGPfLaC7DF4jK5J8wEPTJYuzSkdsWiZo2EVedJt37IWeUIkO7 cjfcdHHvjcVaaa/Uen9U/WPKsDdL6OMuZjUvLNeP89Ix7AXgLvNGWZQX9CjAhx2mH9UO mJ7/4QiI3g871a6Ms2Itg3BAmCEX7x59/pBXAvRLG3oNDs1ToQtDBx5kw3fiUAVKPkzG /z2hSkm5vs5YfmuJv4M98mQEyptEEl9nZh0EhIB7KYh8XcnZLPkb/j6Df4vDAYdQCT6W /DZg== 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=acr9J5300nPLQa5KUpY9HlwrF/T1EGWGRa0HyT7Py2w=; b=NW9FQSgFHeDNq+gCpedwO1kEd8eKL/7ReE612yO232zVG8ZdlrJbEYZ1OLvJgDusaU FSmCtVmfxXvUFHEcmZWf9JPYSj+ctLN81nmTYxSP/3j1h7n0olZQIOeb9krzUQ3Gzlj3 PGpdS54047MWpBVMbNwnwiVCxtfDzf8oARyKpPu9/x92Xmsc5I7eitsjjopd84udRpFu 7QOmw51LgeHZZg/Y6qBZvW1apm5OM1lVazBFjwe6HQldP3NQyGDuh4I8CTDtljhGoU7G 0vIQ+iQH+L/oUEZ2K+ldDdtzoRfrXGcU9ZxNWW6gPRtaCjdoAc5+r6vYGjGMhVkaUfJs Y0Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qNYGVzD4; 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 c2si5362832pgq.734.2017.11.18.19.58.28; Sat, 18 Nov 2017 19:58:41 -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=qNYGVzD4; 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 S1163463AbdKRJ5e (ORCPT + 93 others); Sat, 18 Nov 2017 04:57:34 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36465 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163403AbdKRJ5K (ORCPT ); Sat, 18 Nov 2017 04:57:10 -0500 Received: by mail-pg0-f67.google.com with SMTP id t10so3782965pgo.3 for ; Sat, 18 Nov 2017 01:57:10 -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=acr9J5300nPLQa5KUpY9HlwrF/T1EGWGRa0HyT7Py2w=; b=qNYGVzD4kP+9rQh+yBYIqPbee0mji73Sj7YCApl74y0DC3h6wAqvTj110ByymrUNuR 4pkcDGVDB8Hqmn4vU5VUt9BmTnENaAauyDq0RzDtamW7ihlfrysB5hBjvt23yzwCDwUd tUMDyscNSLDISb4nhtUBarXLD77Ta9Nf8Pbx+majvcW9z94BOl0I36iyUTRqxlRfkJEX vH6Rqu758TlWO8ftQzPJqsrMAI+UHQppad+Yjh+RxYkcoUaormej9bB9EU/Q0D6wHkVw lyiX+Fo6jJ7mrARAbQN5hrVM7eOWTXD+DAc7JaCTP59wkjw2YRMJgOunmMuxM5uK/ejY 0PrQ== 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=acr9J5300nPLQa5KUpY9HlwrF/T1EGWGRa0HyT7Py2w=; b=TBmKpBxh24c0B5JpstlC94tWYvkN5rzVGPQAl+7WlG3fM5flIOW8h78fhlFwYlwBbm 1qlL5g9hxLqtuSdRwqESvma+ED+mWEZz4ngFGOrokhrcDcJe0SKsuKG5bkMHJaEjNOOx T2rO8th8eel2QepLYFxtDa5Nzl335EnJ/c4pibgEb0qMYcEcznsvAPx9KwAh1UeXcvq1 8fhkpK3dmbmj3W6vDv4iHIFzdJC3N/PnF58jxQwCrPHThEXhJBqIl/nSKDm8/EimKoKE XKAhco02V4dELLApMbxS009XDQbz7wMQ04igUq3Hk4SGL/hk6wx1uEhMl+XaPuQ90eif CuPg== X-Gm-Message-State: AJaThX7IlC7V8Dgp+WQzkfPDLyHZ3WQJ2DuMtl17aYEZ+R/Lziyo4eNk D8U23XAkuXEIjUzNL/+SjxY= X-Received: by 10.159.208.2 with SMTP id a2mr8096804plp.370.1510999030036; Sat, 18 Nov 2017 01:57:10 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id r16sm8862577pgt.72.2017.11.18.01.57.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 01:57:09 -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 4/5 v2] ASoC: intel: sst: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 15:26:48 +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/atom/sst/sst_acpi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c index 32d6e02..693b970 100644 --- a/sound/soc/intel/atom/sst/sst_acpi.c +++ b/sound/soc/intel/atom/sst/sst_acpi.c @@ -236,6 +236,9 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx) /* Find the IRQ */ ctx->irq_num = platform_get_irq(pdev, ctx->pdata->res_info->acpi_ipc_irq_index); + if (ctx->irq_num <= 0) + return ctx->irq_num; + return 0; } -- 2.7.4 From 1584401329891139393@xxx Sat Nov 18 11:00:55 +0000 2017 X-GM-THRID: 1584401329891139393 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread