提交 85019b19 编写于 作者: P Pu Lehui 提交者: Alex Deucher

drm/amd/display: Fix gcc unused variable warning

GCC reports the following warning with W=1:

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:3635:17:
warning:
 variable ‘status’ set but not used [-Wunused-but-set-variable]
  3635 |  enum dc_status status = DC_ERROR_UNEXPECTED;
       |                 ^~~~~~

The variable should be used for error check, let's fix it.
Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
Signed-off-by: NPu Lehui <pulehui@huawei.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 56f221b6
......@@ -3675,6 +3675,10 @@ bool dp_retrieve_lttpr_cap(struct dc_link *link)
DP_LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV,
lttpr_dpcd_data,
sizeof(lttpr_dpcd_data));
if (status != DC_OK) {
dm_error("%s: Read LTTPR caps data failed.\n", __func__);
return false;
}
link->dpcd_caps.lttpr_caps.revision.raw =
lttpr_dpcd_data[DP_LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV -
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册