Commit b3c30512 authored by Jens Axboe's avatar Jens Axboe

null_blk: use available 'dev' in nullb_device_power_store()

We already have this pointer, no need to use to_nullb_device()
again.
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 060fd198
......@@ -375,7 +375,7 @@ static ssize_t nullb_device_power_store(struct config_item *item,
set_bit(NULLB_DEV_FL_CONFIGURED, &dev->flags);
dev->power = newp;
} else if (to_nullb_device(item)->power && !newp) {
} else if (dev->power && !newp) {
mutex_lock(&lock);
dev->power = newp;
null_del_dev(dev->nullb);
......
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