]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
s390/dasd: remove unnecessary condition check
authorChengguang Xu <cgxu519@gmx.com>
Mon, 27 Aug 2018 23:51:30 +0000 (07:51 +0800)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 20 Sep 2018 11:20:27 +0000 (13:20 +0200)
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>
drivers/s390/block/dasd.c

index a23e7d394a0ad1f1a74a241f1676accb9a57901a..5e9ebdb0594c537e75fb07b965b7940b6fbc5aab 100644 (file)
@@ -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) {