Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp680119pxb; Tue, 5 Apr 2022 18:30:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwo+IjtbpUFdR187nel5ny6I79uE25iI53+bMY6Ek4NdPaZ/fJIECTZ04hM6xhjp0v6wlAq X-Received: by 2002:a63:3605:0:b0:398:6e02:8578 with SMTP id d5-20020a633605000000b003986e028578mr5100929pga.368.1649208609793; Tue, 05 Apr 2022 18:30:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649208609; cv=none; d=google.com; s=arc-20160816; b=n3YLgpVb+GIYszPcaDeaXHKAnsZRwrSmdXtstlJoJvfKXMKplG0Uastdpr+0z76m+5 QtIzrLB5kJ2NZOB+R3HthTovXHMJ7HV+SLaxchauKQRUh/ce320PqUOlNI5dk7rOVJFP +ObITs5D3i8rW8GZrl6niHeIRTXMwl21eCYLGGRpPjqq8LmxY2Zj67eR/LHtinr+YIiF Ls9Zbr64MUdDv1mDXW+D+MiNNGNTlASZNK9qNVEGOV7pMUQm4+7RzfsjKONqkAZ+aTK0 qTGbEA3DzZ1zILviF+tCAzDnjjEk+Vmov2lkk99U+adjYaetJEPtU4bY8kR5gXuOAPxY +BjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0cFFMl5yfmDARQBuSv11z2kYY1He4ZgleOA2Voa6Jl0=; b=jEidTgkFu2UKlhNYn/X1TQtRnlq5pXJEgBb/ND/W4pjcbSgX2Kmtxak/6+NHc71Ded HMC+JcXBRP+javQzlNeGZw2vY+j1gWGAljQoIbpEfkoYHiXVJFD0Z++NIQR4LFgA9od0 9awJJcd6tvA+IKnHWdq/roe7q6wUGzP28V2lUSoCmn1SVxlbW7Cl86KsGaCfu34GjHof OP5nX6ZhJUmxYz1knMvP5HYgtCQTFmQ9T9VLGuiTugdO2N/+qmeAg4xxiaTViUTAxNsm f4qciH520Uu/FFBWIXx53b2X9gud9mykV/tsSOXjkGK6fRmOpuC2Eue3QTV8iu/QHduQ yZsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ghLt0HNO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a630e42000000b003816043f084si14496446pgo.633.2022.04.05.18.29.54; Tue, 05 Apr 2022 18:30:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ghLt0HNO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235620AbiDEIVc (ORCPT + 99 others); Tue, 5 Apr 2022 04:21:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235548AbiDEH7u (ORCPT ); Tue, 5 Apr 2022 03:59:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13A2F3FBF4; Tue, 5 Apr 2022 00:55:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BA94FB81B14; Tue, 5 Apr 2022 07:55:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30404C340EE; Tue, 5 Apr 2022 07:55:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649145325; bh=E3FaJ/nx3bEWvzszHpgsmAG0aBDSEcXEdDjrXKJkq8M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ghLt0HNO5+Wwg8gXm5940yqUpJzcSZ50P49Ra5dK408WU+iwuCBdeXABpmwTVH0Rc GlvxbBhkDnSXOkMaS7jXJpIgA1R46CGT/zAeqH4aUWcHDyFjYFhmum/JY5nSZ549Dy RNNglgaEF335FP5Fbe/mBUbiQH/Vc6d+hBXZfY7g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Kandagatla , Mark Brown , Sasha Levin Subject: [PATCH 5.17 0364/1126] ASoC: codecs: wcd934x: fix return value of wcd934x_rx_hph_mode_put Date: Tue, 5 Apr 2022 09:18:31 +0200 Message-Id: <20220405070418.311853075@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Srinivas Kandagatla [ Upstream commit 4b0bec6088588a120d33db85b1f0d9f096d1df71 ] wcd934x_rx_hph_mode_put currently returns zero eventhough it changes the value. Fix this, so that change notifications are sent correctly. Fixes: 1cde8b822332 ("ASoC: wcd934x: add basic controls") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220222183212.11580-10-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wcd934x.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index f2674905a4a7..40b414867872 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -3308,13 +3308,16 @@ static int wcd934x_rx_hph_mode_put(struct snd_kcontrol *kc, mode_val = ucontrol->value.enumerated.item[0]; + if (mode_val == wcd->hph_mode) + return 0; + if (mode_val == 0) { dev_err(wcd->dev, "Invalid HPH Mode, default to ClSH HiFi\n"); mode_val = CLS_H_LOHIFI; } wcd->hph_mode = mode_val; - return 0; + return 1; } static int slim_rx_mux_get(struct snd_kcontrol *kc, -- 2.34.1