From: Abaci Team <abaci-bugfix@linux.alibaba.com>
To: linux@armlinux.org.uk
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Abaci Team <abaci-bugfix@linux.alibaba.com>
Subject: [PATCH] ARM: dma-mapping: remove redundant NULL check
Date: Wed, 27 Jan 2021 17:26:06 +0800 [thread overview]
Message-ID: <1611739566-121251-1-git-send-email-abaci-bugfix@linux.alibaba.com> (raw)
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@linux.alibaba.com>
Suggested-by: Yang Li <oswb@linux.alibaba.com>
Signed-off-by: Abaci Team <abaci-bugfix@linux.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
reply other threads:[~2021-01-27 9:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1611739566-121251-1-git-send-email-abaci-bugfix@linux.alibaba.com \
--to=abaci-bugfix@linux.alibaba.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).