We already checked that e is NULL, so no point in calling
elevator_put() to free it.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes:
dc877dbd088f ("blk-mq-sched: add framework for MQ capable IO schedulers")
Signed-off-by: Jens Axboe <axboe@fb.com>
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);
}
}