summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-10-09 18:04:30 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-18 12:49:56 -0700
commit4d664238207a82c4018757e2d87cf2a780462dcd (patch)
tree99825365d41f5e7c52878ed8a8c3a22404ffc3db /drivers/base
parentd9fd4d3b317a231e47f31d64d66c8cc7765d458f (diff)
driver core: kmalloc() failure check in driver_probe_device
driver_probe_device() is missing kmalloc() failure check. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/dd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index ef7db6939cbf..db01b95a47a5 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;