c
if (partner == NULL) {
    return NULL; // or handle the error appropriately
}
return typec_register_altmode(&partner->dev, desc);
