From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andreas Noever <andreas.noever@gmail.com>,
Michael Jamet <michael.jamet@intel.com>,
Yehezkel Bernat <YehezkelShB@gmail.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Lukas Wunner <lukas@wunner.de>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] thunderbolt: Remove a meaningless NULL pointer check before dma_pool_destroy
Date: Mon, 1 Oct 2018 12:31:18 +0300 [thread overview]
Message-ID: <20181001093122.65833-2-mika.westerberg@linux.intel.com> (raw)
In-Reply-To: <20181001093122.65833-1-mika.westerberg@linux.intel.com>
From: zhong jiang <zhongjiang@huawei.com>
dma_pool_destroy() already takes NULL pointer into account so there is
no need to check that again in tb_ctl_free().
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
[mw: reword commit log a bit]
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/thunderbolt/ctl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c
index 37a7f4c735d0..e54e84e43ede 100644
--- a/drivers/thunderbolt/ctl.c
+++ b/drivers/thunderbolt/ctl.c
@@ -662,8 +662,7 @@ void tb_ctl_free(struct tb_ctl *ctl)
tb_ctl_pkg_free(ctl->rx_packets[i]);
- if (ctl->frame_pool)
- dma_pool_destroy(ctl->frame_pool);
+ dma_pool_destroy(ctl->frame_pool);
kfree(ctl);
}
--
2.19.0
next prev parent reply other threads:[~2018-10-01 9:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 9:31 [PATCH 0/5] thunderbolt: Changes for v4.20 merge window Mika Westerberg
2018-10-01 9:31 ` Mika Westerberg [this message]
2018-10-01 9:31 ` [PATCH 2/5] thunderbolt: Make the driver less verbose Mika Westerberg
2018-10-01 9:31 ` [PATCH 3/5] thunderbolt: Print connected devices Mika Westerberg
2018-10-01 9:31 ` [PATCH 4/5] thunderbolt: Convert rest of the driver files to use SPDX identifier Mika Westerberg
2018-10-01 9:31 ` [PATCH 5/5] thunderbolt: Add Intel as copyright holder Mika Westerberg
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=20181001093122.65833-2-mika.westerberg@linux.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=michael.jamet@intel.com \
/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
all inboxes | Powered by JetHome®