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
1 changed files with 0 additions and 1 deletions

View File

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