Commit e599f01f authored by Dan Carpenter's avatar Dan Carpenter Committed by Alex Deucher

drm/amd/display: Fix dmub_psr_destroy()

This is freeing the wrong variable so it will crash.  It should be
freeing "*dmub" instead of "dmub".

Fixes: 4c1a1335 ("drm/amd/display: Driverside changes to support PSR in DMCUB")
Reviewed-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c9427934
...@@ -235,6 +235,6 @@ struct dmub_psr *dmub_psr_create(struct dc_context *ctx) ...@@ -235,6 +235,6 @@ struct dmub_psr *dmub_psr_create(struct dc_context *ctx)
*/ */
void dmub_psr_destroy(struct dmub_psr **dmub) void dmub_psr_destroy(struct dmub_psr **dmub)
{ {
kfree(dmub); kfree(*dmub);
*dmub = NULL; *dmub = NULL;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment