diff options
author | Aric Cyr <[email protected]> | 2020-05-12 23:36:05 -0400 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2020-05-28 14:00:51 -0400 |
commit | 245a022163abd3d67ebc3757199d4d6eb4661bf8 (patch) | |
tree | de0911a67b76cd73b8144b6b88ec687724cb502e /drivers/gpu/drm/amd/display/modules/power/power_helpers.c | |
parent | 15ce104c5a419723f61a186e3711d8e50b131609 (diff) |
drm/amd/display: Guard against invalid array access
[Why]
There are scenarios where no OPP is assigned to an OTG so its value is
0xF which is outside the size of the OPP array causing a potential
driver crash.
[How]
Change the assert to an early return to guard against access. If
there's no OPP assigned already, then OTG will be blank anyways so no
functionality should be lost.
Signed-off-by: Aric Cyr <[email protected]>
Reviewed-by: Zhan Liu <[email protected]>
Acked-by: Qingqing Zhuo <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules/power/power_helpers.c')
0 files changed, 0 insertions, 0 deletions