Commit 2716bc82 authored by Jing Zhou's avatar Jing Zhou Committed by Alex Deucher

drm/amd/display: Add null pointer filter

[Why & How]
Add null pointer filter for logical integrity.
Reviewed-by: default avatarCharlene Liu <Charlene.Liu@amd.com>
Acked-by: default avatarAgustin Gutierrez <agustin.gutierrez@amd.com>
Signed-off-by: default avatarJing Zhou <Jing.Zhou@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3a062581
......@@ -647,7 +647,9 @@ enum gpio_result dal_ddc_set_config(
void dal_ddc_close(
struct ddc *ddc)
{
dal_gpio_close(ddc->pin_clock);
dal_gpio_close(ddc->pin_data);
if (ddc != NULL) {
dal_gpio_close(ddc->pin_clock);
dal_gpio_close(ddc->pin_data);
}
}
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