From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 BD6EE4E36D1; Fri, 9 Oct 2026 14:24:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791555889; cv=none; b=rnuVuXMpmfUMnk9EEqvu+wdmwKKtB9E5+LJC3PO2NWuX8Xji2X8ZP3XoWA4fJ36GQhHlwHkyGBoWfVnWsYjvEJWtjz27YQ1Ha8Bz587+VObGqgSejaDvkN9J6luK5xUnmFA65abKH/jIi4QhwqWwX2Rwjwk/KqU1ChoSz4AM87U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791555889; c=relaxed/simple; bh=27gJZywcYWQiMxqom6iC8+Va8wFM8xejG/VxFsxsFuY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VGe+Qjcc7X9Y/Wipak3t0LawIyXROepX7p+HAryDnyEFDclRBY53EuiVYjRkWlBQoz/iA9Mso55G8G/nl3wIwrJwqEyQw7sxYVQLOSBQghm3FezWWsaJkin9OEBaQ0JOU0BsXScOQjQZ2oEDtn6loWuht8ihbTdcFNeLe5OuDcE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BFd9758c; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="BFd9758c" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2063C1F000FF; Fri, 9 Oct 2026 14:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791555888; bh=s267C3GwcSmwkVCb2gvsmrsk/t2hP6ZBbOz6IeLA5UM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=BFd9758cL23K7lKlq4auQQuAeOsWJc/v40WzscflcyzTVjvpcz464ePfLVNaY5llO ESlTZakqpgWEXRyVdUq2Ed6WysAdD7aXH3Rip474tZPyavpka0v2mbI7ownajlvzBK HX/Prp2F7YdO1cAZZo5xWSsb72V8yDToi2IyeQHA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Takashi Iwai , Sasha Levin Subject: [PATCH 6.18 134/403] ALSA: ice1712: Fix the error handling via auto-cleanup at probe Date: Fri, 9 Oct 2026 16:08:15 +0200 Message-ID: <20261009140955.209559987@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261009140952.119038291@linuxfoundation.org> References: <20261009140952.119038291@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai [ Upstream commit e6229c0402ea4863ec74802d79d5b52b9398d66c ] We used the auto-cleanup via snd_card_unref() for errors at probe of ice1712 driver, but this may be problematic in a subtle way when an error happens at snd_card_register(); since snd_card_unref() skips the snd_card_disconnect() call, it may miss some resource clearance. For fixing the issue, use the new __free(snd_card_free) instead, which does call snd_card_free() explicitly at errors for avoiding such a pitfall. Fixes: d736eba9c453 ("ALSA: ice1712: Fix the card leak at probe error with the auto-cleanup") Link: https://patch.msgid.link/20261001151039.592033-2-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/ice1712/ice1712.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index e20f6bfcbdb87..376df1aa497b7 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c @@ -2523,7 +2523,7 @@ static int snd_ice1712_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) { static int dev; - struct snd_card *card __free(snd_card_unref) = NULL; + struct snd_card *card __free(snd_card_free) = NULL; struct snd_ice1712 *ice; int pcm_dev = 0, err; const struct snd_ice1712_card_info * const *tbl, *c; -- 2.53.0