Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3133732pxk; Mon, 21 Sep 2020 06:11:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxd9z4+p9wS0fy9mMm7VfddaXtLz5LxOe5n2yIKa4/6NdVRxx97R9h0lBilQ3nZp1XaoLyL X-Received: by 2002:a50:ed8d:: with SMTP id h13mr50729099edr.50.1600693916845; Mon, 21 Sep 2020 06:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600693916; cv=none; d=google.com; s=arc-20160816; b=JntUD53KfpISd08NVuIRQFxhsPasYPMv7t+3QsdBN0vsSOq4a6RA23TJIL02H91MAT fWg43aV0oXSZoTtihsqOAYp8ACZtgFdLGcZM8c1j2QyiXkJmpfKV/YS2sJNMaEpKWvMO WqVilma6cee/liw+WIUV296RAAzEQZRNmkTWzlTd05HzWi2sSAGsZcudNECLd7rwoPKv IPCC6B1WErHCE0/Dt/jnw9IN1XUPSBhJKiGy2Ii0/aXYDCEKQm/tiy3EEw4x03kImVmM 64W4F/Xm1AfAUWcEQVh2lz1zhd2kjFBeD4CjHherlHlL9O38VEwHa3MFXD8/0e3JT+Sb 1B5g== 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=uWI3GUXvyAtqYJCZq3vjztmlyvJ3ENITWURsccdjzaM=; b=U+lfkH1eDxZxaG9Gs2DVFhrQRhf8SkRaEJMs2+7UpKez41SkOJPf3wgLndGVST0F0O BxkmzQItoeHEageUu+5r+9Q8FYWOrrNJuI+LFc11tIEpcanQejSY1GiRVPH2mQJsz+fx F9vWy9NplIB/mlcDvbqtNLHlUj/ugxITy3HwtKQoRFT9eRsOQSFF8wS5KijKwUoq2+Sj 7XCNHPNW+rr6LNsx06kJWGtFhVQLi2NRUgtKLi2mmODOgXMzM41qzjoofcV1sq7A83uc DNW6Zu9Z34/vXh8gskewaSldxRTL8XdyxEKNCVkBgIB3X5AUPcvoT8T3QXSdvVMei5Is ElBg== 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 ga23si7819917ejb.691.2020.09.21.06.11.32; Mon, 21 Sep 2020 06:11:56 -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 S1727237AbgIUNKL (ORCPT + 99 others); Mon, 21 Sep 2020 09:10:11 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:42458 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727226AbgIUNKK (ORCPT ); Mon, 21 Sep 2020 09:10:10 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0577B86AF4BD5483D1DB; Mon, 21 Sep 2020 21:10:09 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 21:09:58 +0800 From: Qinglang Miao To: Dave Airlie , Gerd Hoffmann , "David Airlie" , Daniel Vetter CC: , , , , Qinglang Miao Subject: [PATCH -next] drm/qxl: simplify the return expression of qxl_plane_prepare_fb() Date: Mon, 21 Sep 2020 21:10:22 +0800 Message-ID: <20200921131022.91649-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Qinglang Miao --- drivers/gpu/drm/qxl/qxl_display.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 6063f3a15..65de1f69a 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -768,7 +768,6 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane, struct drm_gem_object *obj; struct qxl_bo *user_bo; struct qxl_surface surf; - int ret; if (!new_state->fb) return 0; @@ -804,11 +803,7 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane, } } - ret = qxl_bo_pin(user_bo); - if (ret) - return ret; - - return 0; + return qxl_bo_pin(user_bo); } static void qxl_plane_cleanup_fb(struct drm_plane *plane, -- 2.23.0