- it_data->input_iterator =
- bt_private_connection_create_notification_iterator(connection,
- notif_types);
- if (!it_data->input_iterator) {
- ret = BT_NOTIFICATION_ITERATOR_STATUS_NOMEM;
+ conn_status = bt_private_connection_create_notification_iterator(connection,
+ notif_types, &it_data->input_iterator);
+ if (conn_status != BT_CONNECTION_STATUS_OK) {
+ ret = BT_NOTIFICATION_ITERATOR_STATUS_ERROR;