mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
drm/amd/display: Check engine is not NULL before acquiring
[ Upstream commit 2b63d0ec0d ]
[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 <aric.cyr@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
eb62f4c2eb
commit
2e5154923c
@@ -386,7 +386,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,
|
||||
|
||||
Reference in New Issue
Block a user