All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] driver core: kmalloc() failure check
@ 2006-10-09  9:04 Akinobu Mita
  0 siblings, 0 replies; only message in thread
From: Akinobu Mita @ 2006-10-09  9:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman

driver_probe_device() is missing kmalloc() failure check.

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>

 drivers/base/dd.c |    2 ++
 1 file changed, 2 insertions(+)

Index: work-fault-inject/drivers/base/dd.c
===================================================================
--- work-fault-inject.orig/drivers/base/dd.c	2006-10-09 15:06:35.000000000 +0900
+++ work-fault-inject/drivers/base/dd.c	2006-10-09 15:09:07.000000000 +0900
@@ -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;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-09  9:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-09  9:04 [PATCH] driver core: kmalloc() failure check Akinobu Mita

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.