From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABCE8C606C1 for ; Mon, 8 Jul 2019 15:26:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 75BE521738 for ; Mon, 8 Jul 2019 15:26:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599595; bh=bZH1+pQXpXWoW32pkb6EuaJwhSCBdzAshRe8pVVsUI0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rvFSFIHPTpH+xizO+8HughxDPiucxrZ6y8V/7PsSgz+saWSSczloKyNpxNXMDSNzm NFj/o3vR4m/NuRR0ZVAOm5qPZ7psOpw39NKhEPjhFAnk1wciYVQ/NcL7+ptzd7tDSU YNsIDxxRqu/SV+pZ8P7X8NGG1dWzl0UZxtUutONg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388854AbfGHP0d (ORCPT ); Mon, 8 Jul 2019 11:26:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:54318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388838AbfGHP0c (ORCPT ); Mon, 8 Jul 2019 11:26:32 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 98A4521707; Mon, 8 Jul 2019 15:26:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599591; bh=bZH1+pQXpXWoW32pkb6EuaJwhSCBdzAshRe8pVVsUI0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KsB1GXlQwwgbJ2+uf+fA6TKrL0o1q0qtvXRy9j9Kn7oC24QDNlLZZ0b2BfNiAUSBE NawdTQXrf9Na+DGwt9UJEBD7zViRbcMNNh7aIJm1qxpxvZCflIPZYTLM30NeDtcgNQ JoPup2EKYE9E9BL8XwmB65DEoVFp9xGPeRg2rBS8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shengjiu Wang , Viorel Suman , Daniel Baluta , Mark Brown , Sasha Levin Subject: [PATCH 4.19 11/90] ASoC: ak4458: rstn_control - return a non-zero on error only Date: Mon, 8 Jul 2019 17:12:38 +0200 Message-Id: <20190708150523.176590182@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150521.829733162@linuxfoundation.org> References: <20190708150521.829733162@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 176a11834b65ec35e3b7a953f87fb9cc41309497 ] snd_soc_component_update_bits() may return 1 if operation was successful and the value of the register changed. Return a non-zero in ak4458_rstn_control for an error only. Signed-off-by: Shengjiu Wang Signed-off-by: Viorel Suman Reviewed-by: Daniel Baluta Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/ak4458.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c index 58b6ca1de993..3bd57c02e6fd 100644 --- a/sound/soc/codecs/ak4458.c +++ b/sound/soc/codecs/ak4458.c @@ -272,7 +272,10 @@ static int ak4458_rstn_control(struct snd_soc_component *component, int bit) AK4458_00_CONTROL1, AK4458_RSTN_MASK, 0x0); - return ret; + if (ret < 0) + return ret; + + return 0; } static int ak4458_hw_params(struct snd_pcm_substream *substream, -- 2.20.1