[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200921082432.2591253-1-liushixin2@huawei.com>
Date: Mon, 21 Sep 2020 16:24:32 +0800
From: Liu Shixin <liushixin2@...wei.com>
To: Dave Airlie <airlied@...hat.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>
CC: <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
"Liu Shixin" <liushixin2@...wei.com>
Subject: [PATCH -next] drm/ast: simplify the return expression of ast_* function
Simplify the return expression.
Signed-off-by: Liu Shixin <liushixin2@...wei.com>
---
drivers/gpu/drm/ast/ast_drv.c | 7 +------
drivers/gpu/drm/ast/ast_mode.c | 7 +------
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c
index f0b4af1c390a..a2a3f32260f9 100644
--- a/drivers/gpu/drm/ast/ast_drv.c
+++ b/drivers/gpu/drm/ast/ast_drv.c
@@ -160,15 +160,10 @@ static int ast_drm_thaw(struct drm_device *dev)
static int ast_drm_resume(struct drm_device *dev)
{
- int ret;
-
if (pci_enable_device(dev->pdev))
return -EIO;
- ret = ast_drm_thaw(dev);
- if (ret)
- return ret;
- return 0;
+ return ast_drm_thaw(dev);
}
static int ast_pm_suspend(struct device *dev)
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 834a156e3a75..4dca4ff01d41 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -636,18 +636,13 @@ ast_cursor_plane_helper_prepare_fb(struct drm_plane *plane,
struct drm_framebuffer *fb = new_state->fb;
struct drm_crtc *crtc = new_state->crtc;
struct ast_private *ast;
- int ret;
if (!crtc || !fb)
return 0;
ast = to_ast_private(plane->dev);
- ret = ast_cursor_blit(ast, fb);
- if (ret)
- return ret;
-
- return 0;
+ return ast_cursor_blit(ast, fb);
}
static int ast_cursor_plane_helper_atomic_check(struct drm_plane *plane,
--
2.25.1
Powered by blists - more mailing lists