* [PATCH] drivers/block/mtip32xx: remove the null check for debugfs_remove_recursive
@ 2018-08-08 14:58 zhong jiang
2018-08-08 15:16 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: zhong jiang @ 2018-08-08 14:58 UTC (permalink / raw)
To: axboe, jthumshirn, martin.petersen; +Cc: linux-kernel
debugfs_remove_recursive has taken null pointer into account. So it is
safe to drop the null check before calling the funtion.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
drivers/block/mtip32xx/mtip32xx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 2b6d6bc..d0666f5c 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -2574,8 +2574,7 @@ static int mtip_hw_debugfs_init(struct driver_data *dd)
static void mtip_hw_debugfs_exit(struct driver_data *dd)
{
- if (dd->dfs_node)
- debugfs_remove_recursive(dd->dfs_node);
+ debugfs_remove_recursive(dd->dfs_node);
}
/*
--
1.7.12.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers/block/mtip32xx: remove the null check for debugfs_remove_recursive
2018-08-08 14:58 [PATCH] drivers/block/mtip32xx: remove the null check for debugfs_remove_recursive zhong jiang
@ 2018-08-08 15:16 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2018-08-08 15:16 UTC (permalink / raw)
To: zhong jiang, jthumshirn, martin.petersen; +Cc: linux-kernel
On 8/8/18 8:58 AM, zhong jiang wrote:
> debugfs_remove_recursive has taken null pointer into account. So it is
> safe to drop the null check before calling the funtion.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-08 15:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 14:58 [PATCH] drivers/block/mtip32xx: remove the null check for debugfs_remove_recursive zhong jiang
2018-08-08 15:16 ` Jens Axboe
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®