From patchwork Fri Nov 17 19:33:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 10063541 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 233A86023A for ; Fri, 17 Nov 2017 19:50:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 131ED2A8CD for ; Fri, 17 Nov 2017 19:50:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0727C2A8FD; Fri, 17 Nov 2017 19:50:38 +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 A3B082A8CD for ; Fri, 17 Nov 2017 19:50:36 +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=efoKI7GUMSWJ9+rjUUtz6Z2zkUtjpWU5zlk254URWkw=; b=R7ZFmxSmvGbGLKucfpe1AkJzHo LbmMu0+DljI+0ZVale/40O0I0Rsf10aSeg/pph5WBw8rz3xAlZztKN7m4RE12e6c3igPzDv7a8yxa DdcT+PbEEvMt2IuqrqOtQ4EvhNsK5ssGkdljYKv/bDraiPqSq3/mxjFTWlP9LBhCHGGy0pih3I3R3 bxqo0/riNONwAUqhzMU4kU3K1Fg3UgXxHBmcv5a07am5FcM7DJzZdE2QiVMS0nigk8rT1wqNc6BI3 BzKAxAzM1bty1/1F7S7/FvvmCxj6gIgrSLk9ryZD4lC0KyKk9BbluIZG2evtplS1eiwSw9D2ZYCwe RNapyNbA==; 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 1eFmeq-00024s-C4; Fri, 17 Nov 2017 19:50:36 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFmeo-0001z9-FH; Fri, 17 Nov 2017 19:50:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6tTR2AJBoqeGII5Df1E59emW3s/2hVWG6vvQHzyi51Y=; b=lMb8pCfNJpAToX5OQ1ruRlLAU Lr6/njykEtfc1SxB/OeC/ZzOao1zZ9SZZZONePS8lkmUp1lhLTU8m6vSdWVR76HkbHgVhWgAU4J9k 0lTY0AVr0djRK0b8vxoJZPAYkofQB9TOfz4GRKiYWR1NaHEFhwT+BfuTdssySb4QUmPdHi0xBjg8P KkceIkL+YZngqAVe3DSsNTqGZrjARQIMkKXKtFWQ9jajtVXhFc9h2gK8qTN5nrYCYQh2KJPR+UT+G Qqgq2dWhsyoDUyd4/YSu1BvNyULAU8jyh8+eSttcTpH/mc0s6sY98P4W7pDQGgxEm8eB2SfspRcE+ oxMYatbbQ==; Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eFmP3-0000zJ-2A; Fri, 17 Nov 2017 19:34:20 +0000 Received: by mail-pg0-x243.google.com with SMTP id z184so2629838pgd.13; Fri, 17 Nov 2017 11:33:56 -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=6tTR2AJBoqeGII5Df1E59emW3s/2hVWG6vvQHzyi51Y=; b=kiDXVWFth+18erpna2ZtzWoUPUKsvpvJlmSH1gqvIKT1PvXV6JXF8lFGdzibsQzuN6 FFVaUcszOcwRoveAwK7W6jtF1t92LB6bjy6se7jIrffLocGCvpMrqYNdERHuK5IDMCtC dM6onj60MrgR0FX5LTisCqrLupya96aDAGC71ylxrxQ7QbTA5iqO3trshyCUQntnIlNh SgNQjOKGwyO+N2aampdOGKzft3lhP3jA5diwzNjWOzpHup14N9KxjuTd8uptjwqHNDzm JjE3VCTET+Na/ubSUQfL+25iJrp9lfRJPTnh6gbGTkcu3I/rchYSWkdrgnNjOD1VQoNI Hnug== 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=6tTR2AJBoqeGII5Df1E59emW3s/2hVWG6vvQHzyi51Y=; b=lmP8yJkMcS3KTJVEKjfSgtRgdy885JHpUklY06Zo0JnPO7fuQ1YvgLrWyQLJq79kyd 3xfxzSfEc3u6QrhH9R6Mve3Vv1JrU9u3ZW1SJBBQ6x7n/t/QMEeb9oM08XrNqN30ygnA iTrapqQTBOPZWZapPR8LXxWE9GYeBeZmtR9u6nAueZyRBeOB5IbZj+ImPH9I4nrL7Gil 9QWP6rXp8cONxVrMkIEETBcpdD/vdyuuOb0tTLasWTFw/WBsPsDhySVsJUo53XFHxZkM G4n9i11nO9apa95wHHYm3s//r7kphYInHUp4cMD+022jMJNk/zurVfqrF6859Ep7rovz l0/Q== X-Gm-Message-State: AJaThX60hOZ/2tCH2I00bZxD72vZLmXWIiAtj9Gk+8Hw0pbz3Y6QQlw0 EyQUXyY8NhgUqSeez2d/gGw= X-Google-Smtp-Source: AGs4zMaTpYYUnS2hLf4RsOiYWjUn81RMkbCo7TRntdl2H/56DrRAG+03s+SImArPv0GkChDgxp2I1A== X-Received: by 10.84.138.193 with SMTP id 59mr6318663plp.446.1510947234952; Fri, 17 Nov 2017 11:33:54 -0800 (PST) Received: from localhost.localdomain ([103.16.68.147]) by smtp.gmail.com with ESMTPSA id u77sm9066799pfd.168.2017.11.17.11.33.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Nov 2017 11:33:54 -0800 (PST) From: Arvind Yadav To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com Subject: [PATCH 5/5] ASoC: intel: mfld: Handle return value of platform_get_irq Date: Sat, 18 Nov 2017 01:03:28 +0530 Message-Id: <1510947208-17134-6-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_193417_246629_EBEEA1AB X-CRM114-Status: UNSURE ( 9.78 ) 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/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 */