Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3138812pxk; Mon, 21 Sep 2020 06:18:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKFsIlKeWZbOy26iqElfSrsHhkwgi6buVzehIfalZaPHYvBbHWbusgmmZUHSAjHctxHeGJ X-Received: by 2002:a05:6402:3c8:: with SMTP id t8mr50815182edw.266.1600694281155; Mon, 21 Sep 2020 06:18:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600694281; cv=none; d=google.com; s=arc-20160816; b=alfnD+f8EHFhbicoXZOEFNVA+qPkTor7fGWHXiZP6QYBX+VYaY9h0pzW6NG3wEBt7F cm39vGFCNSBqKBoYshfQq43IycdP7jUFK4Hj1WR94Ne9Y/up2KxH2yJ12agXL1CfPaR7 qhV7vxD+duerGtYAoe4/NVHxXXr0+VeJUsbTyvkuQqdCTxr4zx+c4LvXh4qvV47YOWOc IdMPuGqN4OiycOlKc/8i1uJzMwaPiCi1vNvOum0xwWK+KlhGQDoEvCdO0M4uqQplFN2b mRmmWiZ5O9yGMogdarUKsBbkSySvrl/BEcRNPOXS6FN6/NHg48lS/B+jQeT4aWG6N7vs bkxQ== 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=CV5UqsFhCVDgxuu09fZZtYdLMYWgQ7+f/I5pGYJJwUY=; b=z70I6aWVBODIA/ShgtMCh4+omX4dQ/grkyg4aBNufeu7E6oJE+jUNZKCUYeS0FTbB3 59G6ezo7ldCVucalze/CXtbufrNeXHJv3BhFa0zLvpb5EpHJWx2LZKCHgUyT8SHy8mzs KfN12rz03acUwA+51FddisDsPdxi8JfgVOUITwauwt/9mMBeqbHDtbyb2xa1++rmw0OD fCOyn1Ozp8rCSIDAj1d/xpDtCrnUsjGMkidVs2/5Ac+IU36h5r6jrF3InsVHKByex3vO K4zQR3+UFM9uTtfIJumFKCG7fum96o4VZCakFJxJLh+vhx7OUUe3ozQeA43ZdQ+NTKwr YYFA== 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 gs18si9521347ejb.8.2020.09.21.06.17.38; Mon, 21 Sep 2020 06:18:01 -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 S1727248AbgIUNKN (ORCPT + 99 others); Mon, 21 Sep 2020 09:10:13 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13756 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727113AbgIUNKK (ORCPT ); Mon, 21 Sep 2020 09:10:10 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 36BBFD2A5751974C9D3E; Mon, 21 Sep 2020 21:10:08 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 21:10:00 +0800 From: Qinglang Miao To: Eric Anholt , David Airlie , "Daniel Vetter" CC: , , Qinglang Miao Subject: [PATCH -next] drm/vc4: simplify the return expression of vc4_v3d_bin_bo_get() Date: Mon, 21 Sep 2020 21:10:25 +0800 Message-ID: <20200921131025.91739-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/vc4/vc4_bo.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c index 74ceebd62..dfd214386 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -795,19 +795,13 @@ vc4_prime_import_sg_table(struct drm_device *dev, static int vc4_grab_bin_bo(struct vc4_dev *vc4, struct vc4_file *vc4file) { - int ret; - if (!vc4->v3d) return -ENODEV; if (vc4file->bin_bo_used) return 0; - ret = vc4_v3d_bin_bo_get(vc4, &vc4file->bin_bo_used); - if (ret) - return ret; - - return 0; + return vc4_v3d_bin_bo_get(vc4, &vc4file->bin_bo_used); } int vc4_create_bo_ioctl(struct drm_device *dev, void *data, -- 2.23.0