lkml.org 
[lkml]   [2018]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] md/bcache: Remove NULL check.
Date
Remove unnessesary NULL check before kmem_cache_destroy() in
drivers/md/bcache/request.c

Signed-off-by: Sean Fu <fxinrong@gmail.com>
---
drivers/md/bcache/request.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index ae67f5f..0ddee35 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -1306,8 +1306,7 @@ void bch_flash_dev_request_init(struct bcache_device *d)

void bch_request_exit(void)
{
- if (bch_search_cache)
- kmem_cache_destroy(bch_search_cache);
+ kmem_cache_destroy(bch_search_cache);
}

int __init bch_request_init(void)
--
2.6.2
\
 
 \ /
  Last update: 2018-08-13 11:40    [W:0.041 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site