From: YueHaibing <yuehaibing@huawei.com> To: <linux@armlinux.org.uk> Cc: <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, YueHaibing <yuehaibing@huawei.com> Subject: [PATCH] ARM: dmabounce: remove unnecessary NULL check before dma_pool_destroy Date: Fri, 3 Aug 2018 14:26:27 +0800 [thread overview] Message-ID: <20180803062627.22572-1-yuehaibing@huawei.com> (raw) dma_pool_destroy will do NULL check,thus the check before the call is not needed. Signed-off-by: YueHaibing <yuehaibing@huawei.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 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) -- 2.7.0
WARNING: multiple messages have this Message-ID (diff)
From: yuehaibing@huawei.com (YueHaibing) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: dmabounce: remove unnecessary NULL check before dma_pool_destroy Date: Fri, 3 Aug 2018 14:26:27 +0800 [thread overview] Message-ID: <20180803062627.22572-1-yuehaibing@huawei.com> (raw) dma_pool_destroy will do NULL check,thus the check before the call is not needed. Signed-off-by: YueHaibing <yuehaibing@huawei.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 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) -- 2.7.0
next reply other threads:[~2018-08-03 6:26 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-08-03 6:26 YueHaibing [this message] 2018-08-03 6:26 ` [PATCH] ARM: dmabounce: remove unnecessary NULL check before dma_pool_destroy YueHaibing
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=20180803062627.22572-1-yuehaibing@huawei.com \ --to=yuehaibing@huawei.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.