aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAric Cyr <[email protected]>2020-01-21 22:50:13 -0500
committerAlex Deucher <[email protected]>2020-02-11 15:07:03 -0500
commit2b63d0ec0daf79ba503fa8bfa25e07dc3da274f3 (patch)
tree2e810bb7a16fe3f34b46f24eede5cff58e629fe3
parentaad927b5a863178a9d921044e52d66e0ccf0aff9 (diff)
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: Aric Cyr <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Acked-by: Bhawanpreet Lakha <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dce_aux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
index f1a5d2c6aa37..68c4049cbc2a 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
@@ -400,7 +400,7 @@ static bool acquire(
{
enum gpio_result result;
- if (!is_engine_available(engine))
+ if ((engine == NULL) || !is_engine_available(engine))
return false;
result = dal_ddc_open(ddc, GPIO_MODE_HARDWARE,