From patchwork Sat May 1 11:51:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 12234821 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55EE4C433ED for ; Sat, 1 May 2021 15:24:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E9EDA61613 for ; Sat, 1 May 2021 15:24:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9EDA61613 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=wanadoo.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C578A6E5A0; Sat, 1 May 2021 15:24:43 +0000 (UTC) Received: from smtp.smtpout.orange.fr (smtp06.smtpout.orange.fr [80.12.242.128]) by gabe.freedesktop.org (Postfix) with ESMTPS id F2A2C6E192 for ; Sat, 1 May 2021 11:51:59 +0000 (UTC) Received: from localhost.localdomain ([86.243.172.93]) by mwinf5d12 with ME id zPrv2400321Fzsu03PrvnW; Sat, 01 May 2021 13:51:57 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 01 May 2021 13:51:57 +0200 X-ME-IP: 86.243.172.93 From: Christophe JAILLET To: thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, heiko.stuebner@theobroma-systems.com Subject: [PATCH] drm/panel: leadtek: Fix an error handling path Date: Sat, 1 May 2021 13:51:54 +0200 Message-Id: <588e8b4519487f6d33419c4b0fa7f8ea1b26cb58.1619869792.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 01 May 2021 15:24:43 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe JAILLET , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'ret' is know to be >=0 a this point. Checking the return value of 'mipi_dsi_dcs_enter_sleep_mode()' was intended instead. So add the missing assignment. Fixes: 6ea4383b9214 ("drm/panel: add panel driver for Leadtek LTK050H3146W") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c index ed0d5f959037..6044703df1a7 100644 --- a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c +++ b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c @@ -450,7 +450,7 @@ static int ltk050h3146w_unprepare(struct drm_panel *panel) return ret; } - mipi_dsi_dcs_enter_sleep_mode(dsi); + ret = mipi_dsi_dcs_enter_sleep_mode(dsi); if (ret < 0) { dev_err(ctx->dev, "failed to enter sleep mode: %d\n", ret); return ret;