aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Chamberlain <[email protected]>2021-11-03 09:58:43 -0700
committerJens Axboe <[email protected]>2021-11-03 13:29:20 -0600
commit3aefb5ee843fbe4789d03bb181e190d462df95e4 (patch)
tree0aa80ff2ec4cc04984652419a2acad641c89abd2
parent8468f45091d2866affed6f6a7aecc20779139173 (diff)
nvdimm/btt: do not call del_gendisk() if not needed
del_gendisk() should not called if the disk has not been added. Fix this. Fixes: 41cd8b70c37a ("libnvdimm, btt: add support for blk integrity") Reviewed-by: Dan Williams <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--drivers/nvdimm/btt.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index 4295fa809420..9b9d5e506e11 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -1537,7 +1537,6 @@ static int btt_blk_init(struct btt *btt)
int rc = nd_integrity_init(btt->btt_disk, btt_meta_size(btt));
if (rc) {
- del_gendisk(btt->btt_disk);
blk_cleanup_disk(btt->btt_disk);
return rc;
}