aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/dd.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-10-09 05:04:30 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-18 15:49:56 -0400
commit4d664238207a82c4018757e2d87cf2a780462dcd (patch)
tree99825365d41f5e7c52878ed8a8c3a22404ffc3db /drivers/base/dd.c
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/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)
171 drv->bus->name, dev->bus_id, drv->name); 171 drv->bus->name, dev->bus_id, drv->name);
172 172
173 data = kmalloc(sizeof(*data), GFP_KERNEL); 173 data = kmalloc(sizeof(*data), GFP_KERNEL);
174 if (!data)
175 return -ENOMEM;
174 data->drv = drv; 176 data->drv = drv;
175 data->dev = dev; 177 data->dev = dev;
176 178