]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
drm/amdgpu: fix an error code in init_pmu_entry_by_type_and_add()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 14 Apr 2021 05:58:55 +0000 (08:58 +0300)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Mon, 24 May 2021 23:46:39 +0000 (17:46 -0600)
commitc282a2aa346ce294df58aca221b6b20eb1339933
tree884c7370c508ec614f3849eca88875b4d49ab1ee
parentf2f58f83817e7240ed974b94e9075be79a971969
drm/amdgpu: fix an error code in init_pmu_entry_by_type_and_add()

BugLink: https://bugs.launchpad.net/bugs/1929455
[ Upstream commit 90cb3d8aca1baea9471d28f28d5de1528dd5e424 ]

If the kmemdup() fails then this should return a negative error code
but it currently returns success

Fixes: b4a7db71ea06 ("drm/amdgpu: add per device user friendly xgmi events for vega20")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c