gru: allocation may fail in quicktest1()

The allocation may fail.

Signed-off-by: Roel Kluin <[email protected]>
Acked-by: Jack Steiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Roel Kluin 2009-09-23 15:57:33 -07:00 • committed by Linus Torvalds
commit 9e5f1138d7

View file

@ -937,6 +937,8 @@ static int quicktest1(unsigned long arg)
/* Need 1K cacheline aligned that does not cross page boundary */
p = kmalloc(4096, 0);
if (p == NULL)
return -ENOMEM;
mq = ALIGNUP(p, 1024);
memset(mes, 0xee, sizeof(mes));
dw = mq;