Skip to content

Commit 3aefb5e

Browse files
mcgrofaxboe
authored andcommitted
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: 41cd8b7 ("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]>
1 parent 8468f45 commit 3aefb5e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/nvdimm/btt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,6 @@ static int btt_blk_init(struct btt *btt)
15371537
int rc = nd_integrity_init(btt->btt_disk, btt_meta_size(btt));
15381538

15391539
if (rc) {
1540-
del_gendisk(btt->btt_disk);
15411540
blk_cleanup_disk(btt->btt_disk);
15421541
return rc;
15431542
}

0 commit comments

Comments
 (0)