[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210715195141.1882285-3-mcgrof@kernel.org>
Date: Thu, 15 Jul 2021 12:51:40 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: axboe@...nel.dk
Cc: hare@...e.de, bvanassche@....org, ming.lei@...hat.com,
hch@...radead.org, jack@...e.cz, osandov@...com,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Luis Chamberlain <mcgrof@...nel.org>
Subject: [PATCH 2/3] null_blk: add error handling support for add_disk()
We never checked for errors on add_disk() as this function
returned void. Now that this is fixed, use the shiny new
error handling. The actual cleanup in case of error is
already handled by the caller of null_gendisk_register().
Signed-off-by: Luis Chamberlain <mcgrof@...nel.org>
---
drivers/block/null_blk/main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index d734e9ee1546..2a8f3eee7159 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -1721,8 +1721,7 @@ static int null_gendisk_register(struct nullb *nullb)
return ret;
}
- add_disk(disk);
- return 0;
+ return add_disk(disk);
}
static int null_init_tag_set(struct nullb *nullb, struct blk_mq_tag_set *set)
--
2.27.0
Powered by blists - more mailing lists