Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4183279pxk; Tue, 8 Sep 2020 12:52:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGEayC1SIoJEbo7lQmjcfrZrNevwy35my7Qzgq/cKlRnzWZDyfAg/dQ4msDtqMSgATD6hA X-Received: by 2002:a17:906:454a:: with SMTP id s10mr104168ejq.138.1599594756651; Tue, 08 Sep 2020 12:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599594756; cv=none; d=google.com; s=arc-20160816; b=po97YHiT+mWsaOfjgucbSWPzirHj4fU1KU3dgDYlRJG++hSxt9dsD3J7DHOTMJ9Yzz iYCHDxuM7UcmwNZlDaO9bWKyl6e4zNYArYCbFzouVoK4PXNjgv6ZsQiCJnDyOGKsFWdW 3P9zLgapQU9QGuyvrknDAwTXNyMn9UgXN6/8tell6hy82i17HzuJGmdYDXfKlMxyQzO3 ibcJBCAloXMjTmyw4yaIsFsjrKBoiQt1YpXq3UrDPfAQiLQxOYyd0WNzczFCeblrogLy HAmrJLSFnWGYrn7jmiw82Gydoeo2rEOsvwYx/8lXosaYemN8hAOrs7cpxLkbwcIweAZ2 VXLQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OYWT3v+5OGpI6GUS93DDqtdUzgHCKeB30zkVPJOZJ+M=; b=Jb9BTcn9gnaKUECgd3ZANHm+kOZEYSMRY1CQN7wqSTY2XWg27t3vZ1lUbim7SD0oaX LfoX7NnebNPPXe/gO1mBgR214wIFZ3yIU9AYhAkhGJKlPTjF9YTH/J3ySiTQaD2krE/N 4fX3TzOVBvtsfh0/OXS1ZshisEVLYt/p83osQG0W2xtt+wRGwtk0+57Z46UaHhjfbXu5 tC9d5mVuk4s/uaDRndATAPgJvgSLNnnFwebarQaWxfLtXUK+Vq/p/qhaVDiB0sWRl/oF 7mzT4GJVlIw3t0a6e2Di8hUkmDsN6K0Vqm733gaZA3Uw2d7BxeA4+Pv6o9kMnx89fB8B Ytxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UlNl1Ed1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bm16si76638edb.114.2020.09.08.12.52.14; Tue, 08 Sep 2020 12:52:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UlNl1Ed1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732366AbgIHTv0 (ORCPT + 99 others); Tue, 8 Sep 2020 15:51:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:39054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730549AbgIHPt5 (ORCPT ); Tue, 8 Sep 2020 11:49:57 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 A15B62485E; Tue, 8 Sep 2020 15:45:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599579927; bh=+bIpSi/c6GEhT293GlRTXrXmug0KpOewySLts4rLX6c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UlNl1Ed1vZRIs4PpFFXMlgXZYq2oFcZZJ/sl9CbacAxhp0ZptaeO1ayAzKXSDu8j7 I4lObF0bnm5KZb5u6lO2xVOsQ/3euAEL+7DXFeSoxlkbkdBekUgM5stX/ZJlS90Pai 0yG7mwMlsUvvwXstKfSnDLGt/YTuEjWmfobMA5Gs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tong Zhang , Takashi Iwai Subject: [PATCH 5.4 090/129] ALSA: ca0106: fix error code handling Date: Tue, 8 Sep 2020 17:25:31 +0200 Message-Id: <20200908152234.229551369@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152229.689878733@linuxfoundation.org> References: <20200908152229.689878733@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 From: Tong Zhang commit ee0761d1d8222bcc5c86bf10849dc86cf008557c upstream. snd_ca0106_spi_write() returns 1 on error, snd_ca0106_pcm_power_dac() is returning the error code directly, and the caller is expecting an negative error code Signed-off-by: Tong Zhang Cc: Link: https://lore.kernel.org/r/20200824224541.1260307-1-ztong0001@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/ca0106/ca0106_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c @@ -537,7 +537,8 @@ static int snd_ca0106_pcm_power_dac(stru else /* Power down */ chip->spi_dac_reg[reg] |= bit; - return snd_ca0106_spi_write(chip, chip->spi_dac_reg[reg]); + if (snd_ca0106_spi_write(chip, chip->spi_dac_reg[reg]) != 0) + return -ENXIO; } return 0; }