After a bit more checking, this is a valid check, and I see you also fixed the same code in rilmodem/gprs.c; please disregard.