Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1881669lql; Wed, 13 Mar 2024 10:39:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVHOrzLTXtO9dfcEzYX5KTSElp4xE/042YK70cZXGJOHJ+93NXWsWSHk+VAGb50OosSvsw56frATS1ZFhJszSGZY3blzkOrF/LlNJBQAQ== X-Google-Smtp-Source: AGHT+IG32uT3jrd57TreNlM/QUct5Bp0qxcQ+eW5xcKyUl83bIQu44tCUucbWsrLzoWPvirF1itp X-Received: by 2002:a50:cc47:0:b0:568:1599:b854 with SMTP id n7-20020a50cc47000000b005681599b854mr5327153edi.42.1710351598182; Wed, 13 Mar 2024 10:39:58 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j13-20020a05640211cd00b005684dd18df4si3784468edw.387.2024.03.13.10.39.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 10:39:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102009-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=vEjDxbOk; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-102009-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102009-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 C63561F25C23 for ; Wed, 13 Mar 2024 17:37:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A926D14D43F; Wed, 13 Mar 2024 16:43:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vEjDxbOk" 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 B773F14CADE; Wed, 13 Mar 2024 16:43:42 +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=1710348222; cv=none; b=d9YEQIfUHNfk/pPxYRxOcoxs6VJjLSk7tTvmUqZDsGRqSumZSLZ5X7idTrZtvW+FHaUC9arZBZCqiqUq1n6CQoeLBKyzz+dnnnFX6opfJswnY0N4qH5Ce3NKO06yS+YyfTIltRi17PFHsIAxz8gxZM7z17jWIeEGuI6GAyA9HJI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710348222; c=relaxed/simple; bh=6dxmNiCCcPORI/dA+Z0VsqZXbOzR01ZPsdvJA7HTG90=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mo/aR2mZjy57lWLmlaVYWUd9Yn0kmZEUNtml90AEJXYiZQNiZFzS/dAbAjkIV8dmjmeM60oNWh+vuBOjAZ5WTTCIHDe38lUlWplM0wL4AL3vIrOB3rcb6IPKvcfE+d3jwkU3cMz/SH8l8VMgtN7jX1qNSO02jwwpCNKtrNhek4g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vEjDxbOk; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87382C433F1; Wed, 13 Mar 2024 16:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710348222; bh=6dxmNiCCcPORI/dA+Z0VsqZXbOzR01ZPsdvJA7HTG90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vEjDxbOk4ASmaihi2yzCB60hXT5KNYcUWen59yS+PI2ff2IFp6Q2PxKjCDb025VBc kTbUYnFZnBLAh8YRBovwC3ACQaTEzjIqkPe52sIE/gQJwpKj7/hJvBdZpsQN6zpUi2 jjwM5Mp1xctFeScwM67WTjTlu0AEXHMWL4Taa6Joi5ouKL2DzAdv/+BgCzv1F/M3vN a4iI+AzFy1p2uiXnDy9eWqQH/0PjhWZ5HRr2/v/pKkmKvOvu+/cta4Ze1B2AZ9HRQ5 5B0wrZhcZL83+fQrryy+kFK0Nkz7GOHNJU7G8rqFwTsSff3DnOAQMKFljVBlYTGtsp psmvuy9TSPIWg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Wan Jiabing , Takashi Iwai , Sasha Levin Subject: [PATCH 5.15 68/76] ALSA: usb-audio: Fix wrong kfree issue in snd_usb_endpoint_free_all Date: Wed, 13 Mar 2024 12:42:15 -0400 Message-ID: <20240313164223.615640-69-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: Wan Jiabing [ Upstream commit 03a8b0df757f1beb21ba1626e23ca7412e48b525 ] Fix following coccicheck error: /sound/usb/endpoint.c:1671:8-10: ERROR: reference preceded by free on line 1671. Here should be 'cp' rather than 'ip'. Fixes: c11117b634f4 ("ALSA: usb-audio: Refcount multiple accesses on the single clock") Signed-off-by: Wan Jiabing Link: https://lore.kernel.org/r/20220518021617.10114-1-wanjiabing@vivo.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/usb/endpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index 26af199f3836e..8188113ca83f2 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -1720,7 +1720,7 @@ void snd_usb_endpoint_free_all(struct snd_usb_audio *chip) kfree(ip); list_for_each_entry_safe(cp, cn, &chip->clock_ref_list, list) - kfree(ip); + kfree(cp); } /* -- 2.43.0