[PATCH linux-next] drm/bridge: parade-ps8622: Remove the unneeded result variable

cgel.zte at gmail.com cgel.zte at gmail.com
Thu Aug 25 07:29:13 UTC 2022


From: ye xingchen <ye.xingchen at zte.com.cn>

Return the value ps8622_set() directly instead of storing it in another
redundant variable.

Reported-by: Zeal Robot <zealci at zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen at zte.com.cn>
---
 drivers/gpu/drm/bridge/parade-ps8622.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/parade-ps8622.c b/drivers/gpu/drm/bridge/parade-ps8622.c
index 309de802863d..c605cd725606 100644
--- a/drivers/gpu/drm/bridge/parade-ps8622.c
+++ b/drivers/gpu/drm/bridge/parade-ps8622.c
@@ -324,14 +324,12 @@ static int ps8622_send_config(struct ps8622_bridge *ps8622)
 static int ps8622_backlight_update(struct backlight_device *bl)
 {
 	struct ps8622_bridge *ps8622 = dev_get_drvdata(&bl->dev);
-	int ret, brightness = backlight_get_brightness(bl);
+	int brightness = backlight_get_brightness(bl);
 
 	if (!ps8622->enabled)
 		return -EINVAL;
 
-	ret = ps8622_set(ps8622->client, 0x01, 0xa7, brightness);
-
-	return ret;
+	return ps8622_set(ps8622->client, 0x01, 0xa7, brightness);
 }
 
 static const struct backlight_ops ps8622_backlight_ops = {
-- 
2.25.1


More information about the dri-devel mailing list