Merge tag 'linux-watchdog-4.19-rc2' of git://www.linux-watchdog.org/linux-watchdog
[linux-2.6-microblaze.git] / block / elevator.c
index 5ea6e7d..6a06b5d 100644 (file)
@@ -895,8 +895,7 @@ int elv_register(struct elevator_type *e)
        spin_lock(&elv_list_lock);
        if (elevator_find(e->elevator_name, e->uses_mq)) {
                spin_unlock(&elv_list_lock);
-               if (e->icq_cache)
-                       kmem_cache_destroy(e->icq_cache);
+               kmem_cache_destroy(e->icq_cache);
                return -EBUSY;
        }
        list_add_tail(&e->list, &elv_list);