Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1384314ybb; Thu, 9 Apr 2020 00:38:19 -0700 (PDT) X-Google-Smtp-Source: APiQypJrf0Rc85IYQacYdMWwrsn7y0yWqDvAVGwWNq57Xdgagk4DCOej49hrz7jxSHHh+KYAdPnv X-Received: by 2002:a4a:e1b5:: with SMTP id 21mr9037807ooy.33.1586417898935; Thu, 09 Apr 2020 00:38:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586417898; cv=none; d=google.com; s=arc-20160816; b=m9rk52ZcwGG3D29Js98R0ite5kYENXo+mTsdGoO5s80n8hp3LWU4b0vDsxWm1Z2sbI QE0s7bUOeKhVZY1aiU/SU3Wmj+Xg9AWmNQADA6TdRj+TgNEZkLjnT6yu6MuLYKu1mz8V arcWtuNWyQaFubmkaIZe5+35TTiDnJUWEfByBMdM6dDFmsBNwM5MXiX3kPwL6LaDXM8H 5D5499S7ZKLhILmlw2SyeR7+Jst8mz49uoYSa1wiAgJwGJb0Tmzc+gXyoS3seF/xX0y1 kS/sJtQxETpUT6tsmReWMKpiKFOUucDQofY1h+LpSVNE0gbAvtM/AtO10pMz1b7H+XrG 71Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=jJhcvrbFk7xXiZPIk829fBi9xzbRLr8a72c1UEpJsNY=; b=I73BjloEFAYlpNDT+KPbOV7zU6zQ5aZalyVJa+O/OgVZkTb42oL4z63gceWpY12+vV j00uFynuaeqzhaZqNqQ/PLXlzQSWtPm+f28EhGizq/CTMADoEOamPa2dFGWx/1IV8Blq KMMQm1JWYNPc+RF49dgEriYe87Im4gJDBXxPPc2iS38R3C+eRSJRKmy6BjPw3P9NsyaL LCTSDlfuAOJQmoI8rdQRRjR+RStrCMmNBccqMD2ybytqMfHMs+HKda9Iaf5GIx2iuL7e 9CFUF9X5mZFNOQdTwUqjJL8wV4rMGOVJHnE6M1aCT905kuBEwnWKxRk+MPJic/zwODOY oRjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hygon.cn Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si3778748otr.127.2020.04.09.00.38.03; Thu, 09 Apr 2020 00:38:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hygon.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726642AbgDIHga (ORCPT + 99 others); Thu, 9 Apr 2020 03:36:30 -0400 Received: from spam01.hygon.cn ([110.188.70.11]:13396 "EHLO spam2.hygon.cn" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726082AbgDIHg3 (ORCPT ); Thu, 9 Apr 2020 03:36:29 -0400 X-Greylist: delayed 1219 seconds by postgrey-1.27 at vger.kernel.org; Thu, 09 Apr 2020 03:35:59 EDT Received: from spam2.hygon.cn (localhost [127.0.0.2] (may be forged)) by spam2.hygon.cn with ESMTP id 0397FbS0024891 for ; Thu, 9 Apr 2020 15:15:37 +0800 (GMT-8) (envelope-from linjiasen@hygon.cn) Received: from MK-FE.hygon.cn ([172.23.18.61]) by spam2.hygon.cn with ESMTP id 0397CWCm024636; Thu, 9 Apr 2020 15:12:32 +0800 (GMT-8) (envelope-from linjiasen@hygon.cn) Received: from cncheex01.Hygon.cn ([172.23.18.10]) by MK-FE.hygon.cn with ESMTP id 0397Ccjr052279; Thu, 9 Apr 2020 15:12:38 +0800 (GMT-8) (envelope-from linjiasen@hygon.cn) Received: from ubuntu.localdomain (172.23.18.44) by cncheex01.Hygon.cn (172.23.18.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1466.3; Thu, 9 Apr 2020 15:12:16 +0800 From: Jiasen Lin To: , , , CC: , , , Subject: [PATCH] NTB: Fix static check warning in perf_clear_test Date: Thu, 9 Apr 2020 00:11:24 -0700 Message-ID: <1586416284-3246-1-git-send-email-linjiasen@hygon.cn> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.23.18.44] X-ClientProxiedBy: cncheex02.Hygon.cn (172.23.18.12) To cncheex01.Hygon.cn (172.23.18.10) X-MAIL: spam2.hygon.cn 0397CWCm024636 X-DNSRBL: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As pthr->dma_chan can't be NULL in this context, so there is no need to check pthr->dma_chan. Fixes: 99a06056124d ("NTB: ntb_perf: Fix address err in perf_copy_chunk") Reported-by: Dan Carpenter Signed-off-by: Jiasen Lin --- drivers/ntb/test/ntb_perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c index 972f6d9..f73b126 100644 --- a/drivers/ntb/test/ntb_perf.c +++ b/drivers/ntb/test/ntb_perf.c @@ -1010,8 +1010,8 @@ static void perf_clear_test(struct perf_thread *pthr) pthr->perf->test_peer->dma_dst_addr, pthr->perf->test_peer->outbuf_size, DMA_FROM_DEVICE, 0); - if (pthr->dma_chan) - dma_release_channel(pthr->dma_chan); + + dma_release_channel(pthr->dma_chan); no_dma_notify: atomic_dec(&perf->tsync); -- 2.7.4