libpldm: fix entity_association_tree_copy method

When we execute the entity_association_tree_copy method and keep the
tree always updated, the parent entity should be updated
synchronously.

Also, add the pldm_entity_is_exist_parent method.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Idf3d9fabb2a623798a47f9cb4189592aa57b2c8c
diff --git a/libpldm/pdr.h b/libpldm/pdr.h
index 45ac9a6..9e39da3 100644
--- a/libpldm/pdr.h
+++ b/libpldm/pdr.h
@@ -287,9 +287,17 @@
  *
  *  @param[in] node - opaque pointer acting as a handle to an entity node
  *
- *  @return pldm_entity_node* - opaque pointer to parent entity
+ *  @return pldm_entity - pldm entity
  */
-pldm_entity_node *pldm_entity_get_parent(pldm_entity_node *node);
+pldm_entity pldm_entity_get_parent(pldm_entity_node *node);
+
+/** @brief Check the current pldm entity is exist parent
+ *
+ *  @param[in] node - opaque pointer acting as a handle to an entity node
+ *
+ *  @return bool true if exist parent, false otherwise
+ */
+bool pldm_entity_is_exist_parent(pldm_entity_node *node);
 
 /** @brief Convert entity association tree to PDR
  *