dio: return -ENOMEM when kzalloc() fails
[linux-block.git] / drivers / dio / dio.c
index 193b40e7aec033f6eb88e7d73ba32208a3ca9efc..4c06c93c93d32f59f04d45001e23b21861d3116b 100644 (file)
@@ -219,7 +219,7 @@ static int __init dio_init(void)
                 /* Found a board, allocate it an entry in the list */
                dev = kzalloc(sizeof(struct dio_dev), GFP_KERNEL);
                if (!dev)
-                       return 0;
+                       return -ENOMEM;
 
                dev->bus = &dio_bus;
                dev->dev.parent = &dio_bus.dev;