diff options
| author | Jing Zhou <[email protected]> | 2022-03-10 22:20:41 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-03-15 18:41:48 +0000 |
| commit | 2716bc822e2325efed0731d6a6a7dff755dc34d7 (patch) | |
| tree | bead5c63c8b9909b4ee55cadbaace07e07fe9949 /drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c | |
| parent | drm/amd/display: Retry when fail reading lane status during LT (diff) | |
| download | kernel-2716bc822e2325efed0731d6a6a7dff755dc34d7.tar.gz kernel-2716bc822e2325efed0731d6a6a7dff755dc34d7.zip | |
drm/amd/display: Add null pointer filter
[Why & How]
Add null pointer filter for logical integrity.
Reviewed-by: Charlene Liu <[email protected]>
Acked-by: Agustin Gutierrez <[email protected]>
Signed-off-by: Jing Zhou <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c')
| -rw-r--r-- | drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c b/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c index dae8e489c8cf..778c206f754d 100644 --- a/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c +++ b/drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c @@ -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); + } } |
