Commit 2b63d0ec authored by Aric Cyr's avatar Aric Cyr Committed by Alex Deucher

drm/amd/display: Check engine is not NULL before acquiring

[Why]
Engine can be NULL in some cases, so we must not acquire it.

[How]
Check for NULL engine before acquiring.
Signed-off-by: default avatarAric Cyr <aric.cyr@amd.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Acked-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent aad927b5
...@@ -400,7 +400,7 @@ static bool acquire( ...@@ -400,7 +400,7 @@ static bool acquire(
{ {
enum gpio_result result; enum gpio_result result;
if (!is_engine_available(engine)) if ((engine == NULL) || !is_engine_available(engine))
return false; return false;
result = dal_ddc_open(ddc, GPIO_MODE_HARDWARE, result = dal_ddc_open(ddc, GPIO_MODE_HARDWARE,
......
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