mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00: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:
parent
d36f3e048e
commit
bb1800caf7
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue