Skip to contentSkip to conversation

drm/amd/display: fix signedness bug in execute_synaptics_rc_command()

PATCH Applied Dan Carpenter 2 participants 2 messages Jul 26, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: fix signedness bug in execute_synaptics_rc_command()

The "ret" variable needs to be signed for the error handling to work.

Fixes 2ca97adccdc9 ("drm/amd/display: Add Synaptics Fifo Reset Workaround")
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +1 -1
index d66e3cd64ebd..a0154a5f7183 100644
@@ -569,7 +569,7 @@ static bool execute_synaptics_rc_command(struct drm_dp_aux *aux,
 	unsigned char rc_cmd = 0;
 	unsigned char rc_result = 0xFF;
 	unsigned char i = 0;
-	uint8_t ret = 0;
+	int ret;
 
 	if (is_write_cmd) {
 		// write rc data
Signature · 1 line
2.35.1
Applied
#1 lore raw

Applied. Thanks!

Alex

Quoted 25 lines · Dan Carpenter

The "ret" variable needs to be signed for the error handling to work.

Fixes 2ca97adccdc9 ("drm/amd/display: Add Synaptics Fifo Reset Workaround")
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +1 -2
index d66e3cd64ebd..a0154a5f7183 100644
@@ -569,7 +569,7 @@ static bool execute_synaptics_rc_command(struct drm_dp_aux *aux,
        unsigned char rc_cmd = 0;
        unsigned char rc_result = 0xFF;
        unsigned char i = 0;
-       uint8_t ret = 0;
+       int ret;
 
        if (is_write_cmd) {
                // write rc data
--

2.35.1