block: remove blk_free_devt in add_partition

put_device(pdev) will call pdev->type->release finally, and blk_free_devt
has been called in part_release(), so remove it.

Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
weiping zhang 2017-08-18 23:54:46 +08:00 committed by Jens Axboe
parent 97e05463e0
commit 47570848f0

View file

@ -403,7 +403,6 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno,
device_del(pdev);
out_put:
put_device(pdev);
blk_free_devt(devt);
return ERR_PTR(err);
}