drivers/misc/sgi-gru: fix dereference of ERR_PTR
drivers/misc/sgi-gru: fix dereference of ERR_PTR

gru_alloc_gts() can fail and it can return ERR_PTR(errvalue). We should
not dereference it if it has returned error. And incase it has returned
error then wait for some time and try again.

Signed-off-by: Sudip Mukherjee <8ebcb270388efeefbc3b674e2d51f150dd6e6b25@vectorindia.org>
Acked-by: Dimitri Sivanich <eb9314cd9fb6c9c1ab10792809da7e2f4af25acd@sgi.com>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs