mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
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>
This commit is contained in:
parent
acbd39fbc5
commit
0fbf116d12
@ -178,7 +178,7 @@ int driver_probe_device(struct device_driver * drv, struct device * dev)
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user