From patchwork Thu Jul 16 01:00:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 496143 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 9D39F1401E7; Thu, 16 Jul 2015 11:07:41 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ZFXeD-0005t8-TX; Thu, 16 Jul 2015 01:07:37 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ZFXXJ-0002HF-Cy for kernel-team@lists.ubuntu.com; Thu, 16 Jul 2015 01:00:29 +0000 Received: from 1.general.kamal.us.vpn ([10.172.68.52] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ZFXXJ-0005yq-6e; Thu, 16 Jul 2015 01:00:29 +0000 Received: from kamal by fourier with local (Exim 4.82) (envelope-from ) id 1ZFXXH-00009r-03; Wed, 15 Jul 2015 18:00:27 -0700 From: Kamal Mostafa To: Peter Ujfalusi Subject: [3.19.y-ckt stable] Patch "ASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card" has been added to staging queue Date: Wed, 15 Jul 2015 18:00:26 -0700 Message-Id: <1437008426-575-1-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 X-Extended-Stable: 3.19 Cc: Kamal Mostafa , Mark Brown , kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com This is a note to let you know that I have just added a patch titled ASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree which can be found at: http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue This patch is scheduled to be released in version 3.19.y-ckt4. If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.19.y-ckt tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Kamal ------ From 792afb0066cc5db002f0f567d20e86085109de53 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Thu, 4 Jun 2015 16:04:14 +0300 Subject: ASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card commit 80ba2669ec8c3e6517aa935001f6cb8809bf3df4 upstream. If the card is not part of any card the tas_data->codec is NULL since it is set only during snd_soc_codec_driver.probe, which is not yet called. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown Signed-off-by: Kamal Mostafa --- sound/soc/codecs/tas2552.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1 diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index ae23acd..a073dc9 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -120,6 +120,9 @@ static void tas2552_sw_shutdown(struct tas2552_data *tas_data, int sw_shutdown) { u8 cfg1_reg; + if (!tas_data->codec) + return; + if (sw_shutdown) cfg1_reg = 0; else