bdi: test bdi_init failure
There were two places where return value from bdi_init was not tested. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

parent
a207f59376
commit
8077c0d983
@@ -574,7 +574,8 @@ static struct kobject *base_probe(dev_t dev, int *part, void *data)
|
||||
void __init chrdev_init(void)
|
||||
{
|
||||
cdev_map = kobj_map_init(base_probe, &chrdevs_lock);
|
||||
bdi_init(&directly_mappable_cdev_bdi);
|
||||
if (bdi_init(&directly_mappable_cdev_bdi))
|
||||
panic("Failed to init directly mappable cdev bdi");
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user