mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-25 22:10:59 -05:00
drm/amd/powerplay: avoid NULL dereference, cz_hwmgr.c
if (a == NULL || a->b == NULL) leads to a NULL pointer dereference if a == NULL. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
d36f3e048e
commit
bb1800caf7
@@ -1218,7 +1218,7 @@ static int cz_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
|
||||
|
||||
static int cz_hwmgr_backend_fini(struct pp_hwmgr *hwmgr)
|
||||
{
|
||||
if (hwmgr != NULL || hwmgr->backend != NULL) {
|
||||
if (hwmgr != NULL && hwmgr->backend != NULL) {
|
||||
kfree(hwmgr->backend);
|
||||
kfree(hwmgr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user