Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62d2a194 authored by Chengguang Xu's avatar Chengguang Xu Committed by Jens Axboe
Browse files

block: remove unnecessary condition check



kmem_cache_destroy() can handle NULL pointer correctly, so there is
no need to check e->icq_cache before calling kmem_cache_destroy().

Signed-off-by: default avatarChengguang Xu <cgxu519@gmx.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 46cb52ad
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -895,7 +895,6 @@ 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);
		return -EBUSY;
	}