[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1611739566-121251-1-git-send-email-abaci-bugfix@linux.alibaba.com>
Date: Wed, 27 Jan 2021 17:26:06 +0800
From: Abaci Team <abaci-bugfix@...ux.alibaba.com>
To: linux@...linux.org.uk
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Abaci Team <abaci-bugfix@...ux.alibaba.com>
Subject: [PATCH] ARM: dma-mapping: remove redundant NULL check
Fix below warnings reported by coccicheck:
./arch/arm/common/dmabounce.c:565:2-18: WARNING: NULL check before some
freeing functions is not needed.
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Suggested-by: Yang Li <oswb@...ux.alibaba.com>
Signed-off-by: Abaci Team <abaci-bugfix@...ux.alibaba.com>
---
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 7996c04..bf1218a 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -561,10 +561,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
Powered by blists - more mailing lists