Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp328836pxk; Fri, 11 Sep 2020 08:04:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkSuVBu2Hg9bB3nwZgXnWx4qA+QqzvyApsrbnG0CrfQx7FPh/h1wDjlt6ojkFqcq++g1+8 X-Received: by 2002:a17:906:8690:: with SMTP id g16mr2421600ejx.187.1599836644411; Fri, 11 Sep 2020 08:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599836644; cv=none; d=google.com; s=arc-20160816; b=AXHRVsafDcCrKFW7enq1XIf3TlWD6Ueb6uXRQwGRYorNDeHt6t1dPiUCJk7Mxuaj50 Bcfrh2aap8kCQ/WuNEn+C0MsvMSdCk7ws/cwFvYHAsMsLalLQYHrKDoVB11LVdjFeuQ7 9bcaZmGz9GJ4EtkO7BwrkOpLGM7kb6yISheszt+Wq+Yy/FH3sLK8uSCmfHW6HUGbiGZD q++iQ6ZJmFdx1P7/Yh8OVvhXePweSoqMYsEhAdu5uYZBvXm031K1woQpae04rRtX0dl6 D/idSfPLjoqiUO/E10jY7alAlOQJH23yQUhGcSK0W2xylR6nhDi6RfMrgOoChua7O+d0 74rg== 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=eMhz8qr3TlmqiYQstHEc1fQL4SYhcfHZ8mN7apmV894=; b=XV/pU9JOuF9iZE5zY2WtQsTSDsncVBXCtkMqN7tkN4ECamPiSkxQAOem0SST9sQDPE DVcLX07YOxzPRmSBJT09HdmF4WI+UKB95oUbWXg62JfmoYZw90nBiDOXYUf8+SQmTFTX 54C0QVqKgZLKnFLVp1fQt4IQbykOVxAMZcBHmY3dHyo7+Enbxg/BU81iQ5BwdGmWJ+uU KNuYi1n2BDcAy31mviABRz+tolJ7yA1yJ5xCHkRRXkgYmcc7xC+bnucpitbl2V+s5D4k z0npmJKcIxN73yXbPPXkwxaOFYRSaPlgcVRzSGTm6xhdel7DObdHH90FAN1ppNUOBYcB KIUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SCIQLxv0; 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 m16si1464614edv.36.2020.09.11.08.03.39; Fri, 11 Sep 2020 08:04:04 -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=SCIQLxv0; 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 S1726161AbgIKPCE (ORCPT + 99 others); Fri, 11 Sep 2020 11:02:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:54390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726177AbgIKNCU (ORCPT ); Fri, 11 Sep 2020 09:02:20 -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 AFBE5222B7; Fri, 11 Sep 2020 12:57:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599829033; bh=/EX9EiUO7EKKl32UqMlP7UBxy3ovcwPdEaANNdKgzLU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SCIQLxv0E+gMszeWd24rb+ZvqrRCAvGXCDhhVzj2h79ISSIHwWO8IlxkiRzRWv+HS YMSNrDKw5doPQIRWT5dGhjoA7n9TG5BpXVrEhyyWI/dSyLuDpyXEAOGjiCe50aBSIL 1uEeJuhJdiUMf0PWIUZbI5Dq+jnyVCQl8AP9LZpU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tong Zhang , Takashi Iwai Subject: [PATCH 4.9 40/71] ALSA: ca0106: fix error code handling Date: Fri, 11 Sep 2020 14:46:24 +0200 Message-Id: <20200911122506.925427008@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911122504.928931589@linuxfoundation.org> References: <20200911122504.928931589@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 @@ -551,7 +551,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; }