Commit 610d886c authored by Jens Axboe's avatar Jens Axboe

elevator: fix unnecessary put of elevator in failure case

We already checked that e is NULL, so no point in calling
elevator_put() to free it.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: dc877dbd088f ("blk-mq-sched: add framework for MQ capable IO schedulers")
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 38dbb7dd
......@@ -230,10 +230,6 @@ int elevator_init(struct request_queue *q, char *name)
printk(KERN_ERR
"Default I/O scheduler not found. " \
"Using noop/none.\n");
if (q->mq_ops) {
elevator_put(e);
return 0;
}
e = elevator_get("noop", false);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment