Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946729AbbGaVq7 (ORCPT ); Fri, 31 Jul 2015 17:46:59 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46227 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753942AbbGaTsH (ORCPT ); Fri, 31 Jul 2015 15:48:07 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Mark Brown Subject: [PATCH 4.1 082/267] ASoC: tas2552: Fix kernel crash when the codec is loaded but not part of a card Date: Fri, 31 Jul 2015 12:38:53 -0700 Message-Id: <20150731194004.493905797@linuxfoundation.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <20150731194001.933895871@linuxfoundation.org> References: <20150731194001.933895871@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1064 Lines: 38 4.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Ujfalusi 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: Greg Kroah-Hartman --- sound/soc/codecs/tas2552.c | 3 +++ 1 file changed, 3 insertions(+) --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -120,6 +120,9 @@ static void tas2552_sw_shutdown(struct t { u8 cfg1_reg; + if (!tas_data->codec) + return; + if (sw_shutdown) cfg1_reg = 0; else -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/