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 <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/502533/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 9a5c158 commit d54c518

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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)