From: Akinobu Mita <[email protected]> driver_probe_device() is missing kmalloc() failure check. Signed-off-by: Akinobu Mita <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> --- 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_dr drv->bus->name, dev->bus_id, drv->name); data = kmalloc(sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; data->drv = drv; data->dev = dev; -- 1.4.2.4 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- [GIT PATCH] Driver Core fixes for 2.6.19-rc2
- From: Greg KH <[email protected]>
- [PATCH 1/16] Documentation: feature-removal-schedule typo
- From: Greg KH <[email protected]>
- [PATCH 2/16] Driver core: plug device probe memory leak
- From: Greg KH <[email protected]>
- [PATCH 3/16] Fix dev_printk() is now GPL-only
- From: Greg KH <[email protected]>
- [PATCH 4/16] HOWTO: bug report addition
- From: Greg KH <[email protected]>
- [PATCH 5/16] sysfs: remove duplicated dput in sysfs_update_file
- From: Greg KH <[email protected]>
- [PATCH 6/16] sysfs: update obsolete comment in sysfs_update_file
- From: Greg KH <[email protected]>
- [PATCH 7/16] driver core fixes: sysfs_create_link() retval check in class.c
- From: Greg KH <[email protected]>
- [PATCH 8/16] driver core fixes: bus_add_attrs() retval check
- From: Greg KH <[email protected]>
- [PATCH 9/16] driver core fixes: bus_add_device() cleanup on error
- From: Greg KH <[email protected]>
- [PATCH 10/16] driver core fixes: device_add() cleanup on error
- From: Greg KH <[email protected]>
- [PATCH 11/16] driver core fixes: device_create_file() retval check in dmapool.c
- From: Greg KH <[email protected]>
- [PATCH 12/16] driver core fixes: sysfs_create_group() retval in topology.c
- From: Greg KH <[email protected]>
- [PATCH 13/16] Driver core: Don't leak 'old_class_name' in drivers/base/core.c::device_rename()
- From: Greg KH <[email protected]>
- [PATCH 14/16] Driver core: Don't ignore error returns from probing
- From: Greg KH <[email protected]>
- [PATCH 15/16] Driver core: bus: remove indentation level
- From: Greg KH <[email protected]>
- [GIT PATCH] Driver Core fixes for 2.6.19-rc2
- Prev by Date: [PATCH 7/16] driver core fixes: sysfs_create_link() retval check in class.c
- Next by Date: [PATCH 6/15] aoe: clean up printks via macros
- Previous by thread: [PATCH 15/16] Driver core: bus: remove indentation level
- Next by thread: [GIT PATCH] PCI and PCI hotplug fixes for 2.6.19-rc2
- Index(es):