summaryrefslogtreecommitdiffstats
path: root/drivers/base/dd.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-10-09 11:04:30 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-18 21:49:56 +0200
commit4d664238207a82c4018757e2d87cf2a780462dcd (patch)
tree99825365d41f5e7c52878ed8a8c3a22404ffc3db /drivers/base/dd.c
parentDriver core: bus: remove indentation level (diff)
downloadlinux-4d664238207a82c4018757e2d87cf2a780462dcd.tar.xz
linux-4d664238207a82c4018757e2d87cf2a780462dcd.zip
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/dd.c')
-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;