From 8077c0d983ab276ec5f2700df56a64d671781905 Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Mon, 14 Oct 2013 12:14:13 -0400 Subject: bdi: test bdi_init failure There were two places where return value from bdi_init was not tested. Signed-off-by: Mikulas Patocka Acked-by: Tejun Heo Signed-off-by: Jens Axboe --- fs/char_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/char_dev.c') diff --git a/fs/char_dev.c b/fs/char_dev.c index afc2bb69178..b9bc05b9513 100644 --- a/fs/char_dev.c +++ b/fs/char_dev.c @@ -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"); } -- cgit v1.2.3-18-g5258