pdr: pldm_entity_get_num_children(): Return zero for invalid arguments

It's not possible to return a sensible value if the arguments are
invalid. Return zero as there are no children to match if a NULL node is
passed, and similarly, no matching nodes if the assocation type doesn't
meet the requirements.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ia0edf397a01a1652992a258f80e9836a57209d2d
diff --git a/include/libpldm/pdr.h b/include/libpldm/pdr.h
index 88608aa..91b41de 100644
--- a/include/libpldm/pdr.h
+++ b/include/libpldm/pdr.h
@@ -463,7 +463,9 @@
  *  @param[in] node - opaque pointer acting as a handle to an entity node
  *  @param[in] association_type - relation type filter : logical or physical
  *
- *  @return uint8_t number of children
+ *  @return uint8_t number of children. The returned value is zero if node is NULL or
+ *  	    association_type is not one of PLDM_ENTITY_ASSOCIAION_PHYSICAL or
+ *  	    PLDM_ENTITY_ASSOCIAION_LOGICAL.
  */
 uint8_t pldm_entity_get_num_children(pldm_entity_node *node,
 				     uint8_t association_type);