Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4130982ybz; Tue, 28 Apr 2020 06:20:42 -0700 (PDT) X-Google-Smtp-Source: APiQypLjrrfO8lxiE+g8p27cDCOE4vJP9XTvi/nmVSTHI6EAnpqLOktmci6na3lc6dlKsgtiXjua X-Received: by 2002:a17:907:435d:: with SMTP id oc21mr25325213ejb.100.1588080041871; Tue, 28 Apr 2020 06:20:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588080041; cv=none; d=google.com; s=arc-20160816; b=W3d+TQP0QKcb/x+Vh37pHDgkOxeCIdtBvwkRCamiq+q9/wdImAqUqCwSP6HI75t5rJ jroXv4BOYYfV1p6wa5VwtO4GnqE6tf9Y/qNsjMNLEd7nKeIok6+gn7TQel773mhSE0Ym F7egzxM8gDRj7HRpbM2iysfCxcvI5mXxS48jzIo3uNvYw63vhBUaimMyuFL9gctY1WZg rx1e3mdhGuF1AZcwYDD55uNbiUTzD8SjjRzNmgtlRii3nEeyi6EIen/F52oyL4+Ek/Ny SKDYhJ/LpSG44dPLpHM5Co/Fg/Xe4wZtEeMBYmtRLzYRVR5YbZ5LNKF8U33Xoc22r7BU 3jSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=HX5PM5yH1DOilxfqzjwOMsIu64V3u/r9rIm3R1oya0M=; b=WBUII0fL2/8UnhHYeVfmFZAxGIJB0dwYFvAcmYpH6QOcEiSNUYZgy/vfEjxIC18mRi IhTygxNoug/IQ1T6q2SoeRnFxWslzOKmqkxvC2JA0Ak1yh6bKKAwVNXp+CUQhm2sntME 7KNipD1f4Z9taO5LY9TSKYJc0UP/ol5Z4dLgdsLoeKSlEN6f452x2ltDz4y5BQWbeV/d DmbfT8aSJf+lPsRTPZQZTfe43BzodArXamRk0CQC6VqaKA/6FdIlXAU2BV0gchAe750J asvPajFRiQhXMVuMFWuntrv7Irr9GdRLzG1SrxDdjLIO9PR7G7Kn+5F74NrsJ8Sjd3Ww t6hA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y20si1926363eje.323.2020.04.28.06.20.18; Tue, 28 Apr 2020 06:20:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726902AbgD1NR6 (ORCPT + 99 others); Tue, 28 Apr 2020 09:17:58 -0400 Received: from mail-m17613.qiye.163.com ([59.111.176.13]:58153 "EHLO mail-m17613.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726827AbgD1NR6 (ORCPT ); Tue, 28 Apr 2020 09:17:58 -0400 Received: from ubuntu.localdomain (unknown [157.0.31.122]) by mail-m17613.qiye.163.com (Hmail) with ESMTPA id 8F1184829C3; Tue, 28 Apr 2020 21:17:55 +0800 (CST) From: Bernard Zhao To: Neil Armstrong , David Airlie , Daniel Vetter , Kevin Hilman , dri-devel@lists.freedesktop.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Bernard Zhao Subject: [PATCH] drm/meson: pm resume add return errno branch Date: Tue, 28 Apr 2020 06:17:47 -0700 Message-Id: <20200428131747.2099-1-bernard@vivo.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZSFVMSU5CQkJDSElKTkhISVlXWShZQU hPN1dZLVlBSVdZCQ4XHghZQVk1NCk2OjckKS43PlkG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OSo6Kio*DDgrLE4BVk83MQgt KzYwCzpVSlVKTkNDS0xCQ0xOQ0lOVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlKTkxV S1VISlVKSUlZV1kIAVlBSUpKSjcG X-HM-Tid: 0a71c0efd6a593bakuws8f1184829c3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pm_resump api did not handle drm_mode_config_helper_resume error. This change add handle to return drm_mode_config_helper_resume`s error number. This code logic is aligned with api pm_suspend. After this change, the code maybe a bit readable. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/meson/meson_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index b5f5eb7b4bb9..8c2e1b47e81a 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -412,9 +412,7 @@ static int __maybe_unused meson_drv_pm_resume(struct device *dev) if (priv->afbcd.ops) priv->afbcd.ops->init(priv); - drm_mode_config_helper_resume(priv->drm); - - return 0; + return drm_mode_config_helper_resume(priv->drm); } static int compare_of(struct device *dev, void *data) -- 2.26.2