[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20061009090430.GA6209@localhost>
Date: Mon, 9 Oct 2006 18:04:30 +0900
From: akinobu.mita@...il.com (Akinobu Mita)
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...e.de>
Subject: [PATCH] driver core: kmalloc() failure check
driver_probe_device() is missing kmalloc() failure check.
Cc: Greg Kroah-Hartman <gregkh@...e.de>
Signed-off-by: Akinobu Mita <akinobu.mita@...il.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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists