megasas: avoid NULL pointer dereference