From mboxrd@z Thu Jan 1 00:00:00 1970 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 A6C6712B83; Sat, 3 Feb 2024 04:14:12 +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=1706933652; cv=none; b=PzBoDAFFqmLZjyPf0itt6xYfbLekj9yAuiE8wTYvO2hJdnQdwNFROz69DcjHJkbH27XcbvtLyYqzH9bZJ8tUwRu7COYBPcFoRQZo/tsOBYvYfKsmkeFh6pvU59N2JM+hM8h+C4CguXj0tKiQFFt8fKWzO73CQaOSO6gxjExi250= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706933652; c=relaxed/simple; bh=Y1Km9nC42GLPbvOVzvWM5xKOgRKIEOgapiMRLT6f7R4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BqOFNVemzmt73Oa0hfquONFih/ZDru7ceV7YXBzVjS28/WUnj66fWMlw5W87dcYFZhv8Y8RqqX+80kjFJo27cfbQeFcZyNnyU+v5VHTI4vrrg4hincDqB83bf7+dunfP/l+1dEcciI02Yv7iCcdwqG5nc8MKImsmAyTRUUmkdpU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vKG+ACRF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="vKG+ACRF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F0E8C433F1; Sat, 3 Feb 2024 04:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706933652; bh=Y1Km9nC42GLPbvOVzvWM5xKOgRKIEOgapiMRLT6f7R4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vKG+ACRFVQe/fCd5envfyewXgJ+Nd/wiz3vA+9tB5LZ4fdyFAQw3otzydtRjSJFH2 j+he42//u+q36arJeGkfzuETcXHFVym21Rn5FRzLzko9FAsmuPsavZduvJqxlZrM6K nqioNZH9w1PhP7qMN1UidDO591vsE1ql3M7YE9DA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mario Limonciello , Lijo Lazar , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Srinivasan Shanmugam , Sasha Levin Subject: [PATCH 6.6 213/322] drm/amdgpu: Fix *fw from request_firmware() not released in amdgpu_ucode_request() Date: Fri, 2 Feb 2024 20:05:10 -0800 Message-ID: <20240203035406.130219794@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203035359.041730947@linuxfoundation.org> References: <20240203035359.041730947@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Srinivasan Shanmugam [ Upstream commit 13a1851f923d9a7a78a477497295c2dfd16ad4a4 ] Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:1404 amdgpu_ucode_request() warn: '*fw' from request_firmware() not released on lines: 1404. Cc: Mario Limonciello Cc: Lijo Lazar Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c index 8beefc045e14..bef754177064 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c @@ -1326,9 +1326,13 @@ int amdgpu_ucode_request(struct amdgpu_device *adev, const struct firmware **fw, if (err) return -ENODEV; + err = amdgpu_ucode_validate(*fw); - if (err) + if (err) { dev_dbg(adev->dev, "\"%s\" failed to validate\n", fw_name); + release_firmware(*fw); + *fw = NULL; + } return err; } -- 2.43.0