aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2021-05-18 09:19:30 +0000
committerRobert Foss <[email protected]>2021-05-18 13:27:14 +0000
commitfcb93ec3e87fe2a58b83800edad9c23bc617672b (patch)
tree5dcda05824022efb37a71cbaeb6cc05c90bc95dd /drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
parentdrm/bridge: anx7625: add suspend / resume hooks (diff)
downloadkernel-fcb93ec3e87fe2a58b83800edad9c23bc617672b.tar.gz
kernel-fcb93ec3e87fe2a58b83800edad9c23bc617672b.zip
drm/bridge: ti-sn65dsi86: fix a ternary type promotion bug
The ti_sn_aux_transfer() function returns ssize_t (signed long). It's supposed to return negative error codes or the number of bytes transferred. The "ret" variable is int and the "len" variable is unsigned int. The problem is that with a ternary like this, the negative int is first type promoted to unsigned int to match "len" at this point it is a high positive value. Then when it is type promoted to ssize_t (s64) it remains a high positive value instead of sign extending and becoming a negative again. Fix this by removing the ternary. Fixes: b137406d9679 ("drm/bridge: ti-sn65dsi86: If refclk, DP AUX can happen w/out pre-enable") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/YKOGogHasIyvF8nj@mwanda
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c')
0 files changed, 0 insertions, 0 deletions