vme: Fix error not catched in fake_init()
[platform/kernel/linux-rpi.git] / drivers / vme / bridges / vme_fake.c
index 6a1bc28..eae7836 100644 (file)
@@ -1073,6 +1073,8 @@ static int __init fake_init(void)
 
        /* We need a fake parent device */
        vme_root = __root_device_register("vme", THIS_MODULE);
+       if (IS_ERR(vme_root))
+               return PTR_ERR(vme_root);
 
        /* If we want to support more than one bridge at some point, we need to
         * dynamically allocate this so we get one per device.