From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 21C9BECAAD3 for ; Wed, 7 Sep 2022 05:55:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5787810E307; Wed, 7 Sep 2022 05:55:25 +0000 (UTC) X-Greylist: delayed 306 seconds by postgrey-1.36 at gabe; Wed, 07 Sep 2022 03:35:09 UTC Received: from mail.nfschina.com (mail.nfschina.com [124.16.136.209]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D3A310E0CE for ; Wed, 7 Sep 2022 03:35:09 +0000 (UTC) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id B553F1E80D59; Wed, 7 Sep 2022 11:28:48 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ngmRjKLa8Til; Wed, 7 Sep 2022 11:28:46 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: zeming@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id EA2EB1E80D57; Wed, 7 Sep 2022 11:28:45 +0800 (CST) From: Li zeming To: christian.koenig@amd.com, ray.huang@amd.com, airlied@linux.ie, daniel@ffwll.ch Subject: [PATCH] drm/ttm: Remove unnecessary '0' values from ret Date: Wed, 7 Sep 2022 11:29:34 +0800 Message-Id: <20220907032934.4490-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Mailman-Approved-At: Wed, 07 Sep 2022 05:55:23 +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: Li zeming , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The variable ret is assigned in the judgment branch statement, he does not need to initialize the assignment. Signed-off-by: Li zeming --- include/drm/ttm/ttm_bo_driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 897b88f0bd59..1afa891f488a 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h @@ -106,7 +106,7 @@ static inline int ttm_bo_reserve(struct ttm_buffer_object *bo, bool interruptible, bool no_wait, struct ww_acquire_ctx *ticket) { - int ret = 0; + int ret; if (no_wait) { bool success; -- 2.18.2