Skip to content

Commit d54c518

Browse files
Kuogee Hsiehlumag
authored andcommitted
drm/msm/dp: replace variable err with len at dp_aux_link_power_up()
drm_dp_dpcd_readb() will return 1 to indicate one byte had been read successfully. This patch replace variable "err" with "len" have more correct meaning. changes in v5: -- split into 3 patches Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/502533/ Link: https://lore.kernel.org/r/1662999830-13916-3-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
1 parent 9a5c158 commit d54c518

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

drivers/gpu/drm/msm/dp/dp_link.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ static int dp_aux_link_power_up(struct drm_dp_aux *aux,
4949
struct dp_link_info *link)
5050
{
5151
u8 value;
52-
int err;
52+
ssize_t len;
5353

5454
if (link->revision < 0x11)
5555
return 0;
5656

57-
err = drm_dp_dpcd_readb(aux, DP_SET_POWER, &value);
58-
if (err < 0)
59-
return err;
57+
len = drm_dp_dpcd_readb(aux, DP_SET_POWER, &value);
58+
if (len < 0)
59+
return len;
6060

6161
value &= ~DP_SET_POWER_MASK;
6262
value |= DP_SET_POWER_D0;
6363

64-
err = drm_dp_dpcd_writeb(aux, DP_SET_POWER, value);
65-
if (err < 0)
66-
return err;
64+
len = drm_dp_dpcd_writeb(aux, DP_SET_POWER, value);
65+
if (len < 0)
66+
return len;
6767

6868
usleep_range(1000, 2000);
6969

0 commit comments

Comments
 (0)