From: Wayne Lin <Wayne.Lin@xxxxxxx> Fix NULL_RETURNS error caught by Coverity. => firmware_info32 might be NULL. Check it before dereference. Fixes: 352f9a9451ec ("drm/amd/display/dc: add support for oem i2c in atom_firmware_info_v3_1") Reviewed-by: Wayne Lin <wayne.lin@xxxxxxx> Signed-off-by: Wayne Lin <Wayne.Lin@xxxxxxx> Signed-off-by: Zaeem Mohamed <zaeem.mohamed@xxxxxxx> --- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c index 1d2c6019efac..d967065eea47 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c @@ -1792,7 +1792,7 @@ static enum bp_result get_firmware_info_v3_1( dce_info = GET_IMAGE(struct atom_display_controller_info_v4_1, DATA_TABLES(dce_info)); - if (!firmware_info || !dce_info) + if (!firmware_info || !firmware_info32 || !dce_info) return BP_RESULT_BADBIOSTABLE; memset(info, 0, sizeof(*info)); -- 2.34.1