projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d6ac1c
)
cciss: handle allocation failure
author
Dan Carpenter
<error27@gmail.com>
Mon, 23 Aug 2010 10:28:15 +0000
(12:28 +0200)
committer
Jens Axboe
<jaxboe@fusionio.com>
Mon, 23 Aug 2010 10:28:15 +0000
(12:28 +0200)
If kmalloc() fails then cleanup and return failure (-1).
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/block/cciss.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/block/cciss.c
b/drivers/block/cciss.c
index ce1a75df590209a952c708c35cc4b7416af70170..7191c16954d293ef8f5e0e3c04be20f75aae480a 100644
(file)
--- a/
drivers/block/cciss.c
+++ b/
drivers/block/cciss.c
@@
-4718,6
+4718,9
@@
static int __devinit cciss_init_one(struct pci_dev *pdev,
h->scatter_list = kmalloc(h->max_commands *
sizeof(struct scatterlist *),
GFP_KERNEL);
+ if (!h->scatter_list)
+ goto clean4;
+
for (k = 0; k < h->nr_cmds; k++) {
h->scatter_list[k] = kmalloc(sizeof(struct scatterlist) *
h->maxsgentries,