Received: by 10.223.164.202 with SMTP id h10csp2366791wrb; Sat, 18 Nov 2017 20:23:58 -0800 (PST) X-Google-Smtp-Source: AGs4zMazvMcxXUE8FM1iXs1MupIh4BuPc6yozDjAB6IFhyK191TpP6gpcJ90eMsTnlGUWGu9gdiC X-Received: by 10.98.10.77 with SMTP id s74mr7120738pfi.104.1511065438184; Sat, 18 Nov 2017 20:23:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511065438; cv=none; d=google.com; s=arc-20160816; b=OXa1cz+Lmf66Kp3WaGTrIKcqQCsosieZLyGPJNzQj2LCVOnxGJ1CbTIQwB3XOuDcV5 7Fvg8/ca+9lgYbpsIeENz48x/EMqTKQeLDe91+b+QteF2sLL2cJLpAtLSAr+bHKpfVjx cnQKtMr/NBl/Smt6Z6Jx8khERQ1Xo3oqgafqO54NZJOfcHFVwNLDZar1xMJ7dBrOplHW WNvrlA1wTGGYl7jA2XETQFJn6G/uBDE4HNC1kXJ8XxXr5rIuK/VfQC0gaiRP1eN3NH9i JssukFWZrIfS5zye5z/qOvy8S5tiJ8hHCZYJJk+TWs15QFBtNbmO0Iibey51myLumd/F lFdQ== 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=wZmY6fIuB2q5ipkNwgA1yVWrm0j8KoDeQjdFnsRa3bE=; b=RfY0sjAHlAczReFXI6j0oMzLKhPhqPS5BUSldPfsu82sYZLt3bQAPTj/tu0ttawJNB EEvrpm6V3zRF63NzdDNUdDuKcoicR4o7AgtbP19+T+wyhY70bO9xFZVTcySc6G3CZrci ESEdok14qorIZ0pYvjPuaLYdIxfcpmMh6HZlvV1Yy63Ia7GsV374OYHzuONfDakEyBFZ C7rd9RaeGgxb+h+WZnDHM+KcpNKzCrVH7iabFJShzDEOXQJqVW7wj9Jp94PmCwEr4PVq 2WP8lr2GGaxdOptnRW3peL9FPd2lGFxxnuLFe5O6GYrwcxrN0nd2J9QhiOiXp5sa1hz9 /gqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vTyTWTv6; 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 o13si2080464pgq.475.2017.11.18.20.23.47; Sat, 18 Nov 2017 20:23:58 -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=vTyTWTv6; 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 S1751356AbdKSEPg (ORCPT + 75 others); Sat, 18 Nov 2017 23:15:36 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:40406 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072AbdKSEPe (ORCPT ); Sat, 18 Nov 2017 23:15:34 -0500 Received: by mail-pf0-f193.google.com with SMTP id u70so4839249pfa.7 for ; Sat, 18 Nov 2017 20:15:33 -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=wZmY6fIuB2q5ipkNwgA1yVWrm0j8KoDeQjdFnsRa3bE=; b=vTyTWTv6BoFNNyX8ObGPmfg4Bp1jcLKpFcHZlFPUg+gCB7BNQiXki40KtZDJ+gr9Ka orT0wQfKIDvC4LzQEGLsmW13j73eSOB5nPbgGg20qOEQqSl/v036+pZVSy5VY+LIC3WT lFVwSJyM/GCw0AHqDofsX7y1LF2PnV7LHeDwlHXyQaB6qc5KAMQfzJ2kOypjQJHZQKx3 DsXR0jhLcmTfuVbNctN5gaQPcgdSVIu3CzxBY5SncSvld3lI6NhzKU/AEnnSKt0NnmTE 7HGcGvuSeCkAjWBzT+3TLta5m99DCQBWIKUH0xL9to/1HriiYzczNGgLTsY/sqCcNqHx FpyQ== 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=wZmY6fIuB2q5ipkNwgA1yVWrm0j8KoDeQjdFnsRa3bE=; b=hTmcJKmeK43uquTk1Bck3RXq4+gr1ouuELgv65VtppyNlyJfZYjBrEANGZSTkhjtv+ GHflIOKWxCT0X1GEYPSISP/xDXIIJtiwaPwvhHeZTgVf9WVEXkPVhfFltmhmBk8x1n+F J0nOObL5kp8gCQmFD0G5jUPD6gAQwIdgrDN9qOhr1+uFtDqxpRm5svKMviJXF8a3QOCN h9S+7/KXYQ5Xz4BcgTBGDuxQ0PrjNz8pAIB8ASQjr3u6ttYZ1IRqz6Ic/TyGYk64cV/8 Di37/WBpVauS6+wWHWVmrWdY4w502+yk6d13c6I7WXLrjKalX9IlUM6Z48tsqrg8EMsS 7LFA== X-Gm-Message-State: AJaThX7x/lnwx5B+jxmdPq3AAb5Pukte0I18393S8NKggYTGH/1gh9d3 Id20lBxxzpMiAe1kbwMaNDs= X-Received: by 10.84.240.6 with SMTP id y6mr9554182plk.301.1511064933474; Sat, 18 Nov 2017 20:15:33 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id l14sm12741475pgn.35.2017.11.18.20.15.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 20:15:32 -0800 (PST) From: Arvind Yadav 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 Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 4/5 v3] ASoC: intel: sst: Handle return value of platform_get_irq Date: Sun, 19 Nov 2017 09:45:03 +0530 Message-Id: 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> 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 EIO insted of ctx->irq_num. 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..5e46d06f 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 -EIO; + return 0; } -- 2.7.4 From 1585425208231185757@xxx Wed Nov 29 18:15:01 +0000 2017 X-GM-THRID: 1579807647998704518 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread