From: Roel Kluin Date: Wed, 23 Sep 2009 22:57:33 +0000 (-0700) Subject: gru: allocation may fail in quicktest1() X-Git-Tag: v2.6.32-rc1~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e5f1138d76e45b0ce56314ba0587e5942b55dcc;p=profile%2Fcommon%2Fkernel-common.git gru: allocation may fail in quicktest1() The allocation may fail. Signed-off-by: Roel Kluin Acked-by: Jack Steiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/misc/sgi-gru/grukservices.c b/drivers/misc/sgi-gru/grukservices.c index 79689b1..766e21e 100644 --- a/drivers/misc/sgi-gru/grukservices.c +++ b/drivers/misc/sgi-gru/grukservices.c @@ -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;