summaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@gmx.com>2018-08-28 07:51:30 +0800
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-09-20 13:20:27 +0200
commit734781a9165a1d2fe6117a6435dd3f7619dd9794 (patch)
tree3fe94710fc4d74f69058d491495982d221822c42 /drivers/s390/block
parent55a5542a546238354d1f209f794414168cf8c71d (diff)
downloadblackbird-op-linux-734781a9165a1d2fe6117a6435dd3f7619dd9794.tar.gz
blackbird-op-linux-734781a9165a1d2fe6117a6435dd3f7619dd9794.zip
s390/dasd: remove unnecessary condition check
kmem_cache_destroy() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling kmem_cache_destroy(). Signed-off-by: Chengguang Xu <cgxu519@gmx.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r--drivers/s390/block/dasd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index a23e7d394a0a..5e9ebdb0594c 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -3309,10 +3309,8 @@ dasd_exit(void)
dasd_proc_exit();
#endif
dasd_eer_exit();
- if (dasd_page_cache != NULL) {
- kmem_cache_destroy(dasd_page_cache);
- dasd_page_cache = NULL;
- }
+ kmem_cache_destroy(dasd_page_cache);
+ dasd_page_cache = NULL;
dasd_gendisk_exit();
dasd_devmap_exit();
if (dasd_debug_area != NULL) {
OpenPOWER on IntegriCloud