From: Duncan Sands Date: Wed, 27 Sep 2006 21:38:08 +0000 (+0200) Subject: Driver core: plug device probe memory leak X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0fbf116d120a2dc5d808204c7d86ad35f7d7846f;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Driver core: plug device probe memory leak Make sure data is freed if the kthread fails to start. Signed-off-by: Duncan Sands Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/dd.c b/drivers/base/dd.c index b5f43c3e44fa..ef7db6939cbf 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -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);