mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
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: 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>
This commit is contained in:
parent
38dbb7dd4d
commit
610d886c0c
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user