mirror of
https://github.com/torvalds/linux.git
synced 2026-11-08 21:24:02 +01:00
drm/amd/display: add a NULL pointer check
[why] a fix for a memory crash stress test Reviewed-by: Chris Park <chris.park@amd.com> Signed-off-by: Charlene Liu <charlene.liu@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
6ee70c955f
commit
8f27dbc82e
|
|
@ -1166,6 +1166,10 @@ void dcn10_link_encoder_dp_set_phy_pattern(
|
|||
{
|
||||
struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
|
||||
|
||||
if (!param) {
|
||||
ASSERT_CRITICAL(false);
|
||||
return;
|
||||
}
|
||||
switch (param->dp_phy_pattern) {
|
||||
case DP_TEST_PATTERN_TRAINING_PATTERN1:
|
||||
dcn10_link_encoder_set_dp_phy_pattern_training_pattern(enc, 0);
|
||||
|
|
@ -1189,8 +1193,7 @@ void dcn10_link_encoder_dp_set_phy_pattern(
|
|||
set_dp_phy_pattern_prbs7(enc10);
|
||||
break;
|
||||
case DP_TEST_PATTERN_80BIT_CUSTOM:
|
||||
if (param)
|
||||
set_dp_phy_pattern_80bit_custom(
|
||||
set_dp_phy_pattern_80bit_custom(
|
||||
enc10, param->custom_pattern);
|
||||
break;
|
||||
case DP_TEST_PATTERN_CP2520_1:
|
||||
|
|
@ -1203,8 +1206,7 @@ void dcn10_link_encoder_dp_set_phy_pattern(
|
|||
set_dp_phy_pattern_hbr2_compliance_cp2520_2(enc10, 3);
|
||||
break;
|
||||
case DP_TEST_PATTERN_VIDEO_MODE: {
|
||||
if (param)
|
||||
set_dp_phy_pattern_passthrough_mode(
|
||||
set_dp_phy_pattern_passthrough_mode(
|
||||
enc10, param->dp_panel_mode);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user