Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp248050ybd; Tue, 25 Jun 2019 20:42:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBeh8NdSZzwR5gQW6NPkfZzk/osnC0wEsctVeVOc65mjKWE8Pzue1uAn0phrKg3460jxeY X-Received: by 2002:a17:902:788e:: with SMTP id q14mr2591684pll.234.1561520529594; Tue, 25 Jun 2019 20:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561520529; cv=none; d=google.com; s=arc-20160816; b=jhZ/BLYv4P7R+bqfTZSav4q8LVhCDLntzHXDppt1KfItniUpkS4ItioTQQgsF8GWcY 9vWadVbnLS2OT94t0zqxUy+ZdDQCZgOjOFGy2tJd0SG1iXrRlMjvH1aVK5JtwUmGVM6U G+Z2f32hH5F56WO4vLdrj4moExM6HxySI+ucrH2oJ6NG6i/NlTnusD1bNteQJ+UxG1PU fwdLGaonv1HucdxInwG6VRJkKkirC1FH4wmkVCwU7QeRnvH3sNvErVdE34g3xlcBjnE/ 9wJdyU+SFV1dfxOpmkFqfa6GzlWgqd4ew0HsHHt9HjZUJlmRFcoG2I76ByCrSKsxcbtD bPxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=12J139WHIOvzVN5043cKmjpXzApPH5vmbpBdd6pNZGM=; b=Uhuh1627OpO36flUt6JDUxHmv3m2UyjdQ0USw7TWxWsR9mlIVk38DRjYDPu+rnac0a vgZBJCpzF/niNotqLFK1cLegU6hZ07B4XEOpG2XNiGhuHwgt1skb5haus35TtKZSjJMv O+gCzX2qKr8a1ygUU+wycDU42oPALCjQNVcFHe6CZ9ON1SbET64Dio+zT89DvCXW3Eol /x71v9XHRVbGbcr1WDOeJk+ZkkJk2FAYHCD4UyMIUkPAtecQ0ZoRvvmrGCqIWwa5hcNY iJwNyM60ChfLbaAoFHNqARG7u2GvDHSp+gPrt9t2gEFclLEa8OesR3uPnrQt8qx+qEKQ 2OMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mvNyJWc1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si755466pjr.47.2019.06.25.20.41.53; Tue, 25 Jun 2019 20:42:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mvNyJWc1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726766AbfFZDlc (ORCPT + 99 others); Tue, 25 Jun 2019 23:41:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:51822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbfFZDla (ORCPT ); Tue, 25 Jun 2019 23:41:30 -0400 Received: from sasha-vm.mshome.net (mobile-107-77-172-74.mobile.att.net [107.77.172.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 24C1E2146E; Wed, 26 Jun 2019 03:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520490; bh=CAQlXkAGiWlz4Wzo4ebka0fQJEwXgY0vC62oNT2HpMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mvNyJWc19Ua2JBhTMNw9i+qnXD6YHMpG1jyN0qJZV6us0WV1jxJq9Asqwrjh8DY3v cf4TcG4GKMuDM7gWpPiOofJ0kbYwB38UsGKGAebWzM1H1Woj5vdxd2NIc5gaJ6rF/V Vr39RzAYzK61BqFw67JPcwFJXTwvcN7nuOpGbhUw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Viorel Suman , Shengjiu Wang , Daniel Baluta , Mark Brown , Sasha Levin Subject: [PATCH AUTOSEL 5.1 05/51] ASoC: ak4458: rstn_control - return a non-zero on error only Date: Tue, 25 Jun 2019 23:40:21 -0400 Message-Id: <20190626034117.23247-5-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626034117.23247-1-sashal@kernel.org> References: <20190626034117.23247-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Viorel Suman [ 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 4c5c3ec92609..71562154c0b1 100644 --- a/sound/soc/codecs/ak4458.c +++ b/sound/soc/codecs/ak4458.c @@ -304,7 +304,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