From: Eric Biggers <ebiggers@xxxxxxxxxx>Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
Make elv_unregister_queue() a no-op if q->elevator is NULL or is not
registered.
This simplifies the existing callers, as well as the future caller in
the error path of blk_register_queue().
Also don't bother checking whether q is NULL, since it never is.
Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
---
block/blk-sysfs.c | 3 +--
block/elevator.c | 8 ++++----
2 files changed, 5 insertions(+), 6 deletions(-)