From: Andrey Grodzovsky Date: Mon, 19 Mar 2018 20:48:54 +0000 (-0400) Subject: drm/amd/powerplay: Fix NULL pointer deref on driver unbind. X-Git-Tag: v4.19~1144^2~12^2~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f004938f789963a0d3023da6e528f53bfb9f4429;p=platform%2Fkernel%2Flinux-rpi.git drm/amd/powerplay: Fix NULL pointer deref on driver unbind. Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index 3da3dcc..dbb0e69 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -286,6 +286,12 @@ static int pp_resume(void *handle) return hwmgr_hw_resume(hwmgr); } +static int pp_set_clockgating_state(void *handle, + enum amd_clockgating_state state) +{ + return 0; +} + static const struct amd_ip_funcs pp_ip_funcs = { .name = "powerplay", .early_init = pp_early_init, @@ -300,7 +306,7 @@ static const struct amd_ip_funcs pp_ip_funcs = { .is_idle = pp_is_idle, .wait_for_idle = pp_wait_for_idle, .soft_reset = pp_sw_reset, - .set_clockgating_state = NULL, + .set_clockgating_state = pp_set_clockgating_state, .set_powergating_state = pp_set_powergating_state, };