Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8834434imu; Sat, 29 Dec 2018 04:53:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN5VcshiTSUv25cCsGGQzFK/6hisTha0mG/ytaJDx+xDCsla2ZO1r9TDeDlcFRJymNfnlHFy X-Received: by 2002:a63:2406:: with SMTP id k6mr1486994pgk.229.1546087987522; Sat, 29 Dec 2018 04:53:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546087987; cv=none; d=google.com; s=arc-20160816; b=r7xOUM3VR8MMI2tMbcqXWPG4aRj6IYG1LfkCJOPJSjU8jQpKhoai7UtwbvSQD3sKxL 3HHhJvCSHMeJlqonUW6VJkj5RwjB6YWysnael6NpbI0MrTWeI2ZJEmxFkOh6GosemCDm INFSe3XSHC3PFnrTKQrJNfn9+origgQvVNp5rPIMzM8Zbyyj6ImluGu1EqBqYSHtXCU7 IxXkYghyFkAVp0GMMMQjdNj1veVaYnbzWjxwQOpMia/v0Rl+jwonLwNjY7V83H6K9LOQ F4XwvlUXijrfUSbHRQSXgaNSjY8NU2HDMGDfXJxcqPxz3ssBtwBhthN2i9XYol9jhTVS fWVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=emnIUejfJuhSdOImdC080f0ZAoXdybuJJ6Qff8x/Obo=; b=N67WZI4Qbhtp6LWEI3yR/8r7uPKcte29DKIL/szQAMIFambXqcPlDjljRkKips+Y+w iCqrep//TELnRJq4dfCkv74cBA+f9cWWPPJ0ywiIgQ4w++A0a2YInah1e/9oGou8bPHW DjR5cgyD7xWm2TxWlY1joVNZqwF0Qiad9/M6e7DJI1Mzpts6eHDUT5CdGeYA/54AQxdp EYlvQyKy2Sk/KpWFyDtdJCwYlaL3Z45i5SZ7rAIEdu+wGc9GyP4Qx31KChFbAh9Clvq1 PYxsZ7Kc4ee+8d1I/TRpOM+4YXHZOnEsl5JzP+efBthuiTt7BgaymOS4fr5W5q9ERRi2 AtUg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l66si1581804pfl.258.2018.12.29.04.52.51; Sat, 29 Dec 2018 04:53:07 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727682AbeL2Eov (ORCPT + 99 others); Fri, 28 Dec 2018 23:44:51 -0500 Received: from mxhk.zte.com.cn ([63.217.80.70]:29110 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727409AbeL2Eov (ORCPT ); Fri, 28 Dec 2018 23:44:51 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id 4B826DBFEDF8EAE682DE; Sat, 29 Dec 2018 12:44:46 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id wBT4ieTc075448; Sat, 29 Dec 2018 12:44:40 +0800 (GMT-8) (envelope-from peng.hao2@zte.com.cn) Received: from localhost.localdomain.localdomain ([10.74.120.59]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2018122912452431-19455156 ; Sat, 29 Dec 2018 12:45:24 +0800 From: Peng Hao To: linux@armlinux.org.uk Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Hao Subject: [PATCH 1/2] arm/common/dmabounce : NULL check before dma_pool_destroy Date: Sat, 29 Dec 2018 13:05:26 +0800 Message-Id: <1546059926-97458-1-git-send-email-peng.hao2@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2018-12-29 12:45:24, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-12-29 12:44:20, Serialize complete at 2018-12-29 12:44:20 X-MAIL: mse01.zte.com.cn wBT4ieTc075448 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org NULL check before dma_pool_destroy is unnecessary because there is a NULL check in dma_pool_destroy. Signed-off-by: Peng Hao --- arch/arm/common/dmabounce.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 9a92de6..dcdd80c 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c @@ -569,10 +569,8 @@ void dmabounce_unregister_dev(struct device *dev) BUG(); } - if (device_info->small.pool) - dma_pool_destroy(device_info->small.pool); - if (device_info->large.pool) - dma_pool_destroy(device_info->large.pool); + dma_pool_destroy(device_info->small.pool); + dma_pool_destroy(device_info->large.pool); #ifdef STATS if (device_info->attr_res == 0) -- 1.8.3.1