From: Duncan Sands Date: Wed, 27 Sep 2006 21:38:08 +0000 (+0200) Subject: Driver core: plug device probe memory leak X-Git-Tag: v2.6.19-rc3~126^2~14 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=0fbf116d120a2dc5d808204c7d86ad35f7d7846f;p=~emulex%2Finfiniband.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 b5f43c3e44f..ef7db6939cb 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);