diff options
author | Jens Axboe <axboe@kernel.dk> | 2017-08-28 15:06:31 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-08-28 15:06:31 -0600 |
commit | b3c3051220f3e2a576ba8008c4a87b7d4c8a35e8 (patch) | |
tree | 7876fb1a69cebca40c7080e600186dba7e2b6c2b /drivers/block | |
parent | 060fd198a3e113047da456f15889579067e6b75f (diff) | |
download | linux-b3c3051220f3e2a576ba8008c4a87b7d4c8a35e8.tar.bz2 |
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: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/null_blk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index 3b5cabe374d2..bd922868a861 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -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); |