From patchwork Wed Sep 20 11:47:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 113103 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp665646qgf; Wed, 20 Sep 2017 04:48:37 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA7bwr0H+VMiYsEUOHIQmGHxi/89wThgqrqr2EiUqJfXaIVoJV0jqn1IxyIr1TkOKECEVXa X-Received: by 10.28.7.83 with SMTP id 80mr3788938wmh.158.1505908117131; Wed, 20 Sep 2017 04:48:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505908117; cv=none; d=google.com; s=arc-20160816; b=aqoXty4b8kjmsnj433lGNeZzD/MjS+ovCS+B/a9oxPOpmRwyU25mRQHDL7R6wZhHk4 mVw8YuIq1vxvG6bvXAhrEQ4NG9temQpVS1p29EYa7qmXASQNMyVD1racMrKlHXydXs5m IBgGkaOkmnEPslx3i2zE2MvzWkbvhWSCHh+Wxk16spEEotyu916SkcCJmlvhQ2fw2bff Yq+01+TiP8gdnu8iT7acpSRWLfout8oQ0LmL9FIJSOvLMWAkebCQr3NBLhiwh+SgFcAw cfgYf9yv1AAdoqqgq8z5t8Qef0Y+nQkJF5Fs5IqykspaFAvA7cwD+SHoqHZWwdZZx0qi z5cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=tD6GccO9SjOFmOgB4Hhp172WjCJU57JR9NXUJnrfaes=; b=ITUNo5zLWpXfoLytKKh4SSZ8LuGRiYH5GBWQbBexci0X5Lhoo187C/S6wS/jQJglfs WaC4lbP26Zkzf1K+nq6kJ1gUNKE24If6j5/oXRiYnEhxv4ibTCtECZOzUAyjiE/hRgQa Um/JYxcyc85JIWWfcUijFt3TYkq6CrEp61fvxLbPJiDuHS5XxGoIqGDsB4t4TwBqvLt/ MqDVOYGT7Rd2GD6rDbjSstedoatePGdeN70zPUGW5q8nOyySTRdPT2/2bvKvic4p0Aoy H30VZTOElIvw1f/dXGnxlHy9yUaOG/zPipwUq8xn4mvIYFpxH/1xOe7rOfltpXXFPPcy Uh2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=IDwQW2+u; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id 21si1227911wmr.94.2017.09.20.04.48.36; Wed, 20 Sep 2017 04:48:37 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=IDwQW2+u; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 089FC267544; Wed, 20 Sep 2017 13:47:59 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A7C7526752C; Wed, 20 Sep 2017 13:47:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 7381426752C for ; Wed, 20 Sep 2017 13:47:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: 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:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=VYBHMtVaRXw+7TXIXBSjbZjy0G5qfpbxKMelNOl+Zgw=; b=IDwQW2+uOi6d kaUDMySYH7ZeL6ch24b2qN1C14kBkIBHnEmn0vkkrY9VjinRyjv5Gkftn8oPyIW/wUysHtreNTeut 3YhvsL8VkAZY+zQPOPkvBc0z5/Xtiz/1Nk/0mLVNPu+s6omOGvZyh/UVWZnm3juUN0myjHyGVxMnz fzx/Q=; Received: from [2001:470:1f1d:6b5:7e7a:91ff:fede:4a45] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1dudTv-0003kq-AB; Wed, 20 Sep 2017 11:47:55 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id E69A24400D3; Wed, 20 Sep 2017 04:47:54 -0700 (PDT) From: Mark Brown To: Takashi Iwai In-Reply-To: <20170907085918.4496-2-tiwai@suse.de> Message-Id: <20170920114754.E69A24400D3@finisterre.ee.mobilebroadband> Date: Wed, 20 Sep 2017 04:47:54 -0700 (PDT) Cc: alsa-devel@alsa-project.org, Mark Brown Subject: [alsa-devel] Applied "ASoC: tas571x: Kill BUG_ON() usage" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: tas571x: Kill BUG_ON() usage has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From a029ef45179d72945c7ae0a11f97e8012a5574ac Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 7 Sep 2017 10:59:16 +0200 Subject: [PATCH] ASoC: tas571x: Kill BUG_ON() usage Don't use BUG_ON() for a non-critical sanity check on production systems. This patch replaces with a softer WARN_ON() and an error path. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown --- sound/soc/codecs/tas571x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.13.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c index 810369f687d7..a09499977be4 100644 --- a/sound/soc/codecs/tas571x.c +++ b/sound/soc/codecs/tas571x.c @@ -697,7 +697,8 @@ static int tas571x_i2c_probe(struct i2c_client *client, return PTR_ERR(priv->mclk); } - BUG_ON(priv->chip->num_supply_names > TAS571X_MAX_SUPPLIES); + if (WARN_ON(priv->chip->num_supply_names > TAS571X_MAX_SUPPLIES)) + return -EINVAL; for (i = 0; i < priv->chip->num_supply_names; i++) priv->supplies[i].supply = priv->chip->supply_names[i];