2021-08-05 11:12:17

by Xin Ji

[permalink] [raw]
Subject: [PATCH v11 2/4] drm/bridge: anx7625: fix not correct return value

At some time, the original code may return non zero value, force return 0
if operation finished.

Reviewed-by: Robert Foss <[email protected]>
Signed-off-by: Xin Ji <[email protected]>
---
drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index a3d82377066b..3fc6b7ce7fc7 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -191,10 +191,10 @@ static int wait_aux_op_finish(struct anx7625_data *ctx)
AP_AUX_CTRL_STATUS);
if (val < 0 || (val & 0x0F)) {
DRM_DEV_ERROR(dev, "aux status %02x\n", val);
- val = -EIO;
+ return -EIO;
}

- return val;
+ return 0;
}

static int anx7625_video_mute_control(struct anx7625_data *ctx,
--
2.25.1


2021-10-18 03:50:28

by Xin Ji

[permalink] [raw]
Subject: [PATCH v11 2/4] drm/bridge: anx7625: fix not correct return value

At some time, the original code may return non zero value, force return 0
if operation finished.

Reviewed-by: Robert Foss <[email protected]>
Signed-off-by: Xin Ji <[email protected]>
---
drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 1a871f6b6822..469037f2fd3d 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -191,10 +191,10 @@ static int wait_aux_op_finish(struct anx7625_data *ctx)
AP_AUX_CTRL_STATUS);
if (val < 0 || (val & 0x0F)) {
DRM_DEV_ERROR(dev, "aux status %02x\n", val);
- val = -EIO;
+ return -EIO;
}

- return val;
+ return 0;
}

static int anx7625_video_mute_control(struct anx7625_data *ctx,
--
2.25.1