summaryrefslogtreecommitdiffstats
path: root/drivers/block/null_blk_main.c
diff options
context:
space:
mode:
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>2019-06-20 06:56:58 +0200
committerJens Axboe <axboe@kernel.dk>2019-06-20 11:18:54 +0200
commit8c54803b98d5907b45fe98270be5ed4fbc7e4c4c (patch)
treec244752dcaa72bb47a270aa5bed76f7cb9598f48 /drivers/block/null_blk_main.c
parentblock: move tag field position in struct request (diff)
downloadlinux-8c54803b98d5907b45fe98270be5ed4fbc7e4c4c.tar.xz
linux-8c54803b98d5907b45fe98270be5ed4fbc7e4c4c.zip
null_blk: remove duplicate 0 initialization
In function null_add_dev() struct nullb *nullb member is allocated using kzalloc_node() which returns 0red memory. In function setup_queues() which is called from the null_add_dev(), on successful queue allocation we set the nullb->nr_queues = 0 which is not needed due to earlier use of kzalloc_node(). Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/null_blk_main.c')
-rw-r--r--drivers/block/null_blk_main.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c
index 2a4f8bc4f930..22303e59a274 100644
--- a/drivers/block/null_blk_main.c
+++ b/drivers/block/null_blk_main.c
@@ -1489,7 +1489,6 @@ static int setup_queues(struct nullb *nullb)
if (!nullb->queues)
return -ENOMEM;
- nullb->nr_queues = 0;
nullb->queue_depth = nullb->dev->hw_queue_depth;
return 0;