projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9fd4d3
)
driver core: kmalloc() failure check in driver_probe_device
author
Akinobu Mita
<akinobu.mita@gmail.com>
Mon, 9 Oct 2006 09:04:30 +0000
(18:04 +0900)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Wed, 18 Oct 2006 19:49:56 +0000
(12:49 -0700)
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>
drivers/base/dd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/base/dd.c
b/drivers/base/dd.c
index ef7db6939cbf05af28bac4ae4bedc298d103214f..db01b95a47a501d5976c04d66052a8809f026f29 100644
(file)
--- 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;