aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index f2377f3d95e5..ef51b0083840 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -1244,7 +1244,7 @@ static int __init early_platform_driver_probe_id(char *class_str,
1244 * dev_name() and others to be used before the 1244 * dev_name() and others to be used before the
1245 * rest of the driver core is initialized. 1245 * rest of the driver core is initialized.
1246 */ 1246 */
1247 if (!match->dev.init_name) { 1247 if (!match->dev.init_name && slab_is_available()) {
1248 if (match->id != -1) 1248 if (match->id != -1)
1249 match->dev.init_name = 1249 match->dev.init_name =
1250 kasprintf(GFP_KERNEL, "%s.%d", 1250 kasprintf(GFP_KERNEL, "%s.%d",