Much the driver code in ofono just uses g_new0() in probe functions. That said, if you're going to use g_try_new0(), please add a check for NULL and return -ENOMEM.