From patchwork Fri Nov 17 19:33:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 10063521 Return-Path: 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 C5F97601D3 for ; Fri, 17 Nov 2017 19:36:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B631D2AC9A for ; Fri, 17 Nov 2017 19:36:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB2382ACFC; Fri, 17 Nov 2017 19:36:05 +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 464642AD3B for ; Fri, 17 Nov 2017 19:36:05 +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=nkSEvIwKJXOJGx76GEKOU+GI54RLXob2R+p6jAL6vrQ=; b=uhW+IRkCrXnOPwNagfjTVU3I9H o44coDz1KQSIfAGYK6Mw7qPeFtEhSGkA5h58YXHu9HepqXd/YgZpo7ezeukpLPzHuzG0XNtnH7iR5 kmQhDus08LTpVfEr+Smzhl1GevtB0kvuE6pFoYmcSBilcFZNYPZvSn7gqxL0Dlo9mulckxcZGpq9d Shp4OFS/0iTZMSQ+qVaIIhVQ3lt9n7BS2vLy3/PrD1labwEEWjGQGKUn7MFbwFkIj0R+GyZ07d483 hga8CyYR5j2Tql5IpzKDfuL+7pSlY38jjNFC+tR+NzGrRB5vXhUg6ujafk4b1yxsCgoHu1pBZ2dTK rndAjIbQ==; 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 1eFmQf-0004br-V5; Fri, 17 Nov 2017 19:35:57 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFmOx-0001r2-Pp; Fri, 17 Nov 2017 19:34:53 +0000 Received: by mail-pf0-x242.google.com with SMTP id q4so2614246pfg.13; Fri, 17 Nov 2017 11:33:52 -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; bh=B2YREcXm6OIeWzPWdVSuaV+FErx7cozdK/5SNoyghsQ=; b=EJ9WmneWM4fqT6y90b1orYZ7H8KfqGV8qnwfGICeHgICyPukBRsAizqwRCHOSd8gCC HbgXiCrplShs3AIhzPGk4YRvmcrV6H7aN/NfTXs97f+GnIFlKHAr30EXZRvkWiZwDOmX gJRqm+gj3c32iZ9QhFYc5NGJWbZ9TLOLjUTUUMVmTCLtxChYDd5UqMyvMZStDT5tC7Yk 6ZivERwxUvuNFhfaecvw5F3121584+YCpqYMu6kz87pa5kkzGDX8KsOwDflsEWZdgoUg lxrvaxBYLQsxhtUt79f2yhuB46wSGNKNB4SkIdU54PN8UX+0Gep66x+X7FlyM7SvjUDQ aBUA== 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; bh=B2YREcXm6OIeWzPWdVSuaV+FErx7cozdK/5SNoyghsQ=; b=iUlGDZLQGN/66/Dn/nn15/rp1+2T7Dk9PoMbv4OJ+KApqDbVXCIACEWBV+9R+dgo7t TuP3YnX3UY+OMHCkLpaCj3yyHH4plOL1FX50XjnbW10dItbtQXGjLKHJHRZHGGckKjEJ j9arhl/bJen24QRJxnBwHbicOgOaLOlsFJTJOYMGmwThud/wKYL8zUQIwMv/wdOZwX10 xx4vIk4a2YybD6617CMhaD10oS8iYYE84N7612QcAQSsKNigIkuuSZQmPt4Q3DMi4fJH YWIZbU7lplj3LePulysuXPIC9dYxy33ilABmI6Q45H14qnAgFWgTdYpdPvtAIsVEVSOw NC4A== X-Gm-Message-State: AJaThX7M5eX0cSWE2OTuw3KHHovB9rZIN6nLi6M5mpWFuPQ3crQrcMM0 ssuPjOsvOHLyqACq8sG8xxo= X-Google-Smtp-Source: AGs4zMZG/8b4F8q4njAmACv5+d1AYU8cYA6IzL3Nt5XIy+7DwGnhfMtJDjsTuHr8wUkNdBcIPG2kkg== X-Received: by 10.159.214.147 with SMTP id n19mr3640323plp.1.1510947231953; Fri, 17 Nov 2017 11:33:51 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id u77sm9066799pfd.168.2017.11.17.11.33.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 11:33:51 -0800 (PST) From: Arvind Yadav To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com Subject: [PATCH 4/5] ASoC: intel: sst: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 01:03:27 +0530 Message-Id: <1510947208-17134-5-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510947208-17134-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1510947208-17134-1-git-send-email-arvind.yadav.cs@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171117_113412_418186_0C252832 X-CRM114-Status: UNSURE ( 9.14 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP platform_get_irq() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- 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; }