diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2006-10-09 09:04:30 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-10-18 19:49:56 (GMT) |
commit | 4d664238207a82c4018757e2d87cf2a780462dcd (patch) | |
tree | 99825365d41f5e7c52878ed8a8c3a22404ffc3db /drivers/base | |
parent | d9fd4d3b317a231e47f31d64d66c8cc7765d458f (diff) | |
download | linux-fsl-qoriq-4d664238207a82c4018757e2d87cf2a780462dcd.tar.xz |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index ef7db69..db01b95 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; |