Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1880591lql; Wed, 13 Mar 2024 10:37:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWG0TQ88kK7u02KyYZR1SmnkXCoiCZZYSmPhDNEcLd9ZD0iGvyiCebIwO6iCOMOAU/Noxbwku3yjv3RWCf0T0VxGis+XOvuqLjT+HwcFQ== X-Google-Smtp-Source: AGHT+IGwNS4V2WfvCRyMGi8g8pzR+zaa3Tb/td3ydibRFMK/STou/I0tciu0NtfZPZnZ30qBN4g0 X-Received: by 2002:a50:a417:0:b0:566:a822:990e with SMTP id u23-20020a50a417000000b00566a822990emr9515307edb.38.1710351452349; Wed, 13 Mar 2024 10:37:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710351452; cv=pass; d=google.com; s=arc-20160816; b=u6YfavOAJ+Hfy8ifEzZephIm/ZplbfRkMt7FmQYMNH7tWyy755LG61ocK6lZUoJ72p L/ni7/ikRomwd9ooTTe1bivJMYMXEBOncvdchVtF7BlU+feCmcRXQSTvG6bEva/0QJxl JG0o7blZo/9UJAgXhdGZYOY++J4Nr2E+KdP2vKpb03z9NhNmNRkvyGSRuOAZSgxOVXDQ FN1DRKyS11dv4/aRzYAbdqDP1Pq3RBWQOsKbiN+oSB4dU7c3EtsZAJ8iU6pL5awHPzRW t0VmSrPoEEa30BhZwKasPLjCrWj9WRQeQlc2Qoy7Gs24x8Lls1qwSEqMf0Chyxq/i8sL 5CnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=60qkoD6xrSegp/nzTvjrboW2NMktqaq0CeLk0s2J+KQ=; fh=rFbiR8o32NX4gr7DGGl175mQ6fTp8DLkQApotarON0U=; b=YQ1LFcFTUay4ywGK28D4IYhfDRYQbQTjZ7HA0H8w6p4sJXSGorYQLKYVAvI1O/NiuF uCTW24sVx7we8i4wlnbQt6omRIH6ZagBVf/kUIY6AyAFKQflGnp/9zBNdo+BVcq8eIyG EGx94vQzlLHWcbcRxX/jagO4Lhsw+wFIyVa9expZhsOOpdeGP84PJIqA8CzLJ9JkdgMr +xd2Xu6xNisxPDGx12IcHK7d7mhYEZKU3KS5HgAmpVHrYqzt/AcUWBXi4KdiTqjYpD4P Xj/fJwvX6J0YSTeAo9koAvRk3XQgqAtNBjqMPIA1hzwU8cHBIKq4fSVN/zigftoYm5AA QsrQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ASNAI3Jc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101973-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 14-20020a0564021f4e00b0056870562159si2116689edz.590.2024.03.13.10.37.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 10:37:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101973-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ASNAI3Jc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-101973-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9BA1F1F25C65 for ; Wed, 13 Mar 2024 17:29:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C92E145652; Wed, 13 Mar 2024 16:43:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ASNAI3Jc" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B5F06341F; Wed, 13 Mar 2024 16:43:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710348182; cv=none; b=T7J4K8FzoT0gvR87UeKKl0UIn4h6XfxuqhdkmDRBD6P3ikLSOZg4pqm1+CEBtPmcyquw1XGiMNmOK0iKajEmPFBGE2tCC7g2rNISn+NUVcyJYy6It2Ko14T6pXdyd2vHYHR3+KT7wRJppTZGh410hu17fN8wqzV85QHRimjIGew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710348182; c=relaxed/simple; bh=L3YXKMWNBC7K/C/TGW/wJXP/alvbOQPZAj9zj67+GfY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E8kaksA1oKghkqlfijK+z2oJGvasWaWKFiN1j0N/6LuN7ACGIZ0lLHyMsWzRiMY2PDpVr3uAp9n0FX30pxiFg3q4YAzTHD8TaSKeOABUhrb0YTHznheBMca2huTsnCxpkVTG7vV18Bwt+XJ1w3AuQT5FrFdMuhwldPPTA22K4N8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ASNAI3Jc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BD02C43390; Wed, 13 Mar 2024 16:43:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710348182; bh=L3YXKMWNBC7K/C/TGW/wJXP/alvbOQPZAj9zj67+GfY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ASNAI3Jc6WXxpmdEfVrAXFh9JeCZiveMaZFLWcG1k3jsYvvK90j4Lex4lIbLHysMK ll/RLwiGzlvpxOHnlcQICxkCe1E0FWE6xaUFtwNNvRTjoQNEJGwwLQDSL2u9xjGyWJ 8zsogMtq3JrBYaMng5+Gz3UmqP4R54WHo7YQEt2wXin/u1YdoEsANt0h5o9j8eKWG+ mMgicip5CV4DkVtIsEG9KSaKKH+1qO/Bu+/RH2bIKtucvskxg9ypCxivURFJ2WOFB2 qO51QH/BWeopbDw9hTIgTeE78UAnOwJ3uMYkFipjcv+fv2U40yYnGR7VXBUhRBEltw Uwjq8olTMIYEQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Takashi Iwai , Sasha Levin Subject: [PATCH 5.15 33/76] ALSA: usb-audio: Correct the return code from snd_usb_endpoint_set_params() Date: Wed, 13 Mar 2024 12:41:40 -0400 Message-ID: <20240313164223.615640-34-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240313164223.615640-1-sashal@kernel.org> References: <20240313164223.615640-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.152-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.15.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.15.152-rc1 X-KernelTest-Deadline: 2024-03-15T16:42+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Takashi Iwai [ Upstream commit 9355b60e401d825590d37f04ea873c58efe9b7bf ] snd_usb_endpoint_set_params() should return zero for a success, but currently it returns the sample rate. Correct it. Fixes: 2be79d586454 ("ALSA: usb-audio: Split endpoint setups for hw_params and prepare (take#2)") Link: https://lore.kernel.org/r/20221009104212.18877-4-tiwai@suse.de Signed-off-by: Takashi Iwai Stable-dep-of: 7822baa844a8 ("ALSA: usb-audio: add quirk for RODE NT-USB+") Signed-off-by: Sasha Levin --- sound/usb/endpoint.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index 486ef6b022552..80ead3db4d1c7 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -1388,6 +1388,8 @@ int snd_usb_endpoint_set_params(struct snd_usb_audio *chip, ep->curframesize = ep->curpacksize / ep->cur_frame_bytes; err = update_clock_ref_rate(chip, ep); + if (err >= 0) + err = 0; unlock: mutex_unlock(&chip->mutex); return err; -- 2.43.0