Driver core: plug device probe memory leak
Make sure data is freed if the kthread fails to start.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index b5f43c3..ef7db69 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -178,7 +178,7 @@
probe_task = kthread_run(really_probe, data,
"probe-%s", dev->bus_id);
if (IS_ERR(probe_task))
- ret = PTR_ERR(probe_task);
+ ret = really_probe(data);
} else
ret = really_probe(data);