From: Jens Axboe Date: Mon, 28 Aug 2017 21:06:31 +0000 (-0600) Subject: null_blk: use available 'dev' in nullb_device_power_store() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b3c3051220f3e2a576ba8008c4a87b7d4c8a35e8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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);