@@ -1052,7 +1052,6 @@ static bool dp_ctrl_train_pattern_set(struct dp_ctrl_private *ctrl,
u8 pattern)
{
u8 buf;
- int ret = 0;
DRM_DEBUG_DP("sink: pattern=%x\n", pattern);
@@ -1061,8 +1060,7 @@ static bool dp_ctrl_train_pattern_set(struct dp_ctrl_private *ctrl,
if (pattern && pattern != DP_TRAINING_PATTERN_4)
buf |= DP_LINK_SCRAMBLING_DISABLE;
- ret = drm_dp_dpcd_writeb(ctrl->aux, DP_TRAINING_PATTERN_SET, buf);
- return ret == 1;
+ return drm_dp_dpcd_writeb(ctrl->aux, DP_TRAINING_PATTERN_SET, buf) == 1;
}
static int dp_ctrl_read_link_status(struct dp_ctrl_private *ctrl,
@@ -782,7 +782,6 @@ static int dp_link_process_link_training_request(struct dp_link_private *link)
bool dp_link_send_test_response(struct dp_link *dp_link)
{
struct dp_link_private *link = NULL;
- int ret = 0;
if (!dp_link) {
DRM_ERROR("invalid input\n");
@@ -791,10 +790,8 @@ bool dp_link_send_test_response(struct dp_link *dp_link)
link = container_of(dp_link, struct dp_link_private, dp_link);
- ret = drm_dp_dpcd_writeb(link->aux, DP_TEST_RESPONSE,
- dp_link->test_response);
-
- return ret == 1;
+ return drm_dp_dpcd_writeb(link->aux, DP_TEST_RESPONSE,
+ dp_link->test_response) == 1;
}
int dp_link_psm_config(struct dp_link *dp_link,
@@ -829,7 +826,6 @@ int dp_link_psm_config(struct dp_link *dp_link,
bool dp_link_send_edid_checksum(struct dp_link *dp_link, u8 checksum)
{
struct dp_link_private *link = NULL;
- int ret = 0;
if (!dp_link) {
DRM_ERROR("invalid input\n");
@@ -838,9 +834,8 @@ bool dp_link_send_edid_checksum(struct dp_link *dp_link, u8 checksum)
link = container_of(dp_link, struct dp_link_private, dp_link);
- ret = drm_dp_dpcd_writeb(link->aux, DP_TEST_EDID_CHECKSUM,
- checksum);
- return ret == 1;
+ return drm_dp_dpcd_writeb(link->aux, DP_TEST_EDID_CHECKSUM,
+ checksum) == 1;
}
static int dp_link_parse_vx_px(struct dp_link_private *link)