From: Roel Kluin Date: Wed, 23 Sep 2009 22:57:33 +0000 (-0700) Subject: gru: allocation may fail in quicktest1() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9e5f1138d76e45b0ce56314ba0587e5942b55dcc;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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 79689b10f937..766e21e15574 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;