Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2953841pxk; Mon, 21 Sep 2020 01:06:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2kkd15vhFlGcMMezxrJh5d3nSwVIuFDYQoxoQJi/npOViUfOFu/SkubPv9c42aCAvqDfk X-Received: by 2002:a17:906:af6a:: with SMTP id os10mr47562672ejb.34.1600675597133; Mon, 21 Sep 2020 01:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675597; cv=none; d=google.com; s=arc-20160816; b=E2VqHLck+VH98/U3PAfM9uAqrVkJ23xfpHR4MzDNHrSr+hRWwlQNVitCWEdkCpRaNq XBiAZYzi/dx/WlF9NatFU41+c/tpT2AnYqyDyw/uVQ+OB8S/AAwuFfCJgwnBUswkQTeK xAMYIfLoaKS4p6B5aTBxkAADR8s3lG7SRsA5Xxvls1dIpgFJq/mn5lCPZqGWM74Jt1XL DHk6rlsmr+eBAY3YbMStCncb5s2VzaCEScK+AD7OSgim1UICQNGKjc7vLQiA4hG89jto N1x/NNjpq6B03CAbzsDyv71QRlT1Lo0rA3CQM7Kq+FoORB+t85ClXauYki8ExzL8jpAt JACg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=TclhvaBt35wYT2UVcS7CHTi7Zuww4QntfSsrbok8Otc=; b=OUO8ZRFo4vtMxkmoKwaSK4xJ9UJXEjjld+MGqvwqKbdcmMTwhIPYkDeXd77xKnmASU Hh2wUVH8FGvofFxBVk9wXOcLRczCctKHlGKZw+jVehKExMhQX7179ohvqmEvlFHd6z1/ 4zGFWxR7RK0doyvMoPTRBSY3vm2K78oDsqPpVDJLDNmbtvRONMAfCUWAFJserQgbpw+7 VRMiT64U7xOpgXUKJnWrHmovRazglzYwTu6wiXLxBXuzbKN789+JR6tl0ojK+acunDk8 XZpAOnBsB2SzkXqCyMOkbXEsqfQn/Cq3mHzScgTzkyAUlcUcnhaU1Kywzj1SzhqiobL5 cUPw== 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 y3si7975703edr.538.2020.09.21.01.06.14; Mon, 21 Sep 2020 01:06:37 -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 S1727096AbgIUIEJ (ORCPT + 99 others); Mon, 21 Sep 2020 04:04:09 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13740 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726553AbgIUICS (ORCPT ); Mon, 21 Sep 2020 04:02:18 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E0748222A75F2A36BE81; Mon, 21 Sep 2020 16:02:15 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 16:02:07 +0800 From: Liu Shixin To: Dave Airlie , Thomas Zimmermann , David Airlie , Daniel Vetter CC: , , "Liu Shixin" Subject: [PATCH -next] drm/ast: simplify the return expression of ast_* function Date: Mon, 21 Sep 2020 16:24:32 +0800 Message-ID: <20200921082432.2591253-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- 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