[PATCH 5.5 080/367] MIPS: SGI-IP30: Check for valid pointer before using it