- if (upstream_comp_class_type != BT_COMPONENT_CLASS_TYPE_SOURCE &&
- upstream_comp_class_type != BT_COMPONENT_CLASS_TYPE_FILTER) {
- /* Unsupported operation. */
- BT_LOGW("Upstream component's class is not a source or filter component class: "
- "comp-class-type=%s",
- bt_component_class_type_string(upstream_comp_class_type));
- goto error;
- }
-
- iterator = bt_notification_iterator_create(upstream_component,
- upstream_port, notification_types, connection);
- if (!iterator) {
+ assert(upstream_comp_class_type == BT_COMPONENT_CLASS_TYPE_SOURCE ||
+ upstream_comp_class_type == BT_COMPONENT_CLASS_TYPE_FILTER);
+ status = bt_notification_iterator_create(upstream_component,
+ upstream_port, notification_types, connection, &iterator);
+ if (status != BT_CONNECTION_STATUS_OK) {