Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1515666ybj; Tue, 5 May 2020 23:23:46 -0700 (PDT) X-Google-Smtp-Source: APiQypIIwHWu8HoJjWW4A0n1xKcmJ1HS0yNGDB1bmDwdZNw18zVozWkhVbGYTVTolJCURxXJYPDk X-Received: by 2002:a05:6402:1ad0:: with SMTP id ba16mr5681182edb.11.1588746226552; Tue, 05 May 2020 23:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588746226; cv=none; d=google.com; s=arc-20160816; b=sDKGulAUvwbtNa/NahQclMbqHVnrvGhFkPZgayfoVeeKf1q35awszXQu5fMbu2WZrp 4QWn5ahdGMwGTfKAHIM9AB8XvrNxJbkq6sIdyvYJ/t4rGf72FDJpm4HUQsFRDGwy4tvk TKNDp/NBmJRBjngP+nsRYhu5LOnYpjp3/ZGUsUcJ9wNb0kaRp/tW7q7nGizhZeBPqM+4 L7nKIEoukWohT5sh5LpAhQNmXhizqPgqvz1dY4SAfbFpDZX+DikpDmZUqKUhPWrKd5f/ EOMEZSUTxRwqp2PBubvNzq31oeSnhGWdWNdK9/xif9s4RSJMJUuMUykjoViW6P/oeFQh 1oxg== 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=XO/2l5PL3xMgVOZj3WAmdyK7nT7TMFPBv0IcTQqX1A4=; b=lOdrQDGGApNMzasodeiqG6ITa0f78VmeG3m3p07jc3/3Cwh8fHRfeZ1tNdLwhhZTrf hu0TPqUCUXs6pUSqBFRnL0r+h9nl+pky902XqB8RPJEMUgICg0Y/fbk4up7y5AsmF1tJ e764BUStUetfX7ClAbFEpw/aT59MWPfCqKaqbGWFdhgNLIJL215ZYvUlXZT80muE9vYh jBx+TshGPUJMIZpGSbf3zAuyzHCOm0UuFbVyRxnA56Q9404GTRXNM8Gyy5s6bUkoqtTK PuB/kD6gFzEexiIEj79hDbreQk7yXptX396I473LaTlCqmbJ/VAU2tyeQUGkF8XlByil 7DPw== 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 o4si566349eda.102.2020.05.05.23.23.24; Tue, 05 May 2020 23:23:46 -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 S1728029AbgEFGTi (ORCPT + 99 others); Wed, 6 May 2020 02:19:38 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3810 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726863AbgEFGTi (ORCPT ); Wed, 6 May 2020 02:19:38 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 64528F2DB9A8FB5C990B; Wed, 6 May 2020 14:19:36 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Wed, 6 May 2020 14:19:30 +0800 From: Jason Yan To: , , , , , , , , , , , CC: Jason Yan Subject: [PATCH] dma-buf: heaps: Remove Unneeded variable "ret" in dma_heap_dma_buf_begin_cpu_access() Date: Wed, 6 May 2020 14:18:51 +0800 Message-ID: <20200506061851.19745-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: drivers/dma-buf/heaps/heap-helpers.c:203:5-8: Unneeded variable: "ret". Return "0" on line 216 Signed-off-by: Jason Yan --- drivers/dma-buf/heaps/heap-helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma-buf/heaps/heap-helpers.c b/drivers/dma-buf/heaps/heap-helpers.c index 9f964ca3f59c..c82872501ba2 100644 --- a/drivers/dma-buf/heaps/heap-helpers.c +++ b/drivers/dma-buf/heaps/heap-helpers.c @@ -200,7 +200,6 @@ static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, { struct heap_helper_buffer *buffer = dmabuf->priv; struct dma_heaps_attachment *a; - int ret = 0; mutex_lock(&buffer->lock); @@ -213,7 +212,7 @@ static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, } mutex_unlock(&buffer->lock); - return ret; + return 0; } static int dma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf, -- 2.21.1