From 64f5c996bdb6651c894f4a08f512f0ee655ecd99 Mon Sep 17 00:00:00 2001 From: Andrzej Hajda Date: Fri, 8 Jul 2016 12:54:00 +0200 Subject: [PATCH] drm/panel/s6e3ha2: fix s6e3ha2_clear_error The purpose of s6e3ha2_clear_error is to clear ctx->error and return cleaned value to caller. Change-Id: I5cb0cd93acc91463ad72d0eab45a302dd26a72e5 Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/panel/panel-s6e3ha2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-s6e3ha2.c b/drivers/gpu/drm/panel/panel-s6e3ha2.c index 4853d45..95d7652 100644 --- a/drivers/gpu/drm/panel/panel-s6e3ha2.c +++ b/drivers/gpu/drm/panel/panel-s6e3ha2.c @@ -303,9 +303,12 @@ static inline struct s6e3ha2 *panel_to_s6e3ha2(struct drm_panel *panel) return container_of(panel, struct s6e3ha2, panel); } -static void s6e3ha2_clear_error(struct s6e3ha2 *ctx) +static int s6e3ha2_clear_error(struct s6e3ha2 *ctx) { + int ret = ctx->error; + ctx->error = 0; + return ret; } static void s6e3ha2_dcs_write(struct s6e3ha2 *ctx, const u8 cmd, -- 2.7.4