Skip to content

Commit

Permalink
gru: allocation may fail in quicktest1()
Browse files Browse the repository at this point in the history
The allocation may fail.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
RoelKluin authored and torvalds committed Sep 24, 2009
1 parent f8679af commit 9e5f113
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/misc/sgi-gru/grukservices.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9e5f113

Please sign in to comment.