From: Akinobu Mita Date: Mon, 9 Oct 2006 09:04:30 +0000 (+0900) Subject: driver core: kmalloc() failure check in driver_probe_device X-Git-Tag: v2.6.19-rc3~126^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d664238207a82c4018757e2d87cf2a780462dcd;p=linux-2.6 driver core: kmalloc() failure check in driver_probe_device driver_probe_device() is missing kmalloc() failure check. Signed-off-by: Akinobu Mita Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/dd.c b/drivers/base/dd.c index ef7db6939c..db01b95a47 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -171,6 +171,8 @@ int driver_probe_device(struct device_driver * drv, struct device * dev) drv->bus->name, dev->bus_id, drv->name); data = kmalloc(sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; data->drv = drv; data->dev = dev;