net/bnxt: fix Rx configuration
[dpdk.git] / drivers / net / dpaa2 / dpaa2_ptp.c
index 8d79e39..4e6d375 100644 (file)
@@ -111,10 +111,12 @@ int dpaa2_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
 {
        struct dpaa2_dev_priv *priv = dev->data->dev_private;
 
-       if (priv->next_tx_conf_queue)
-               dpaa2_dev_tx_conf(priv->next_tx_conf_queue);
-       else
+       if (priv->next_tx_conf_queue) {
+               while (!priv->tx_timestamp)
+                       dpaa2_dev_tx_conf(priv->next_tx_conf_queue);
+       } else {
                return -1;
+       }
        *timestamp = rte_ns_to_timespec(priv->tx_timestamp);
 
        return 0;
@@ -168,8 +170,7 @@ dpaa2_create_dprtc_device(int vdev_fd __rte_unused,
        return 0;
 
 init_err:
-       if (dprtc_dev)
-               rte_free(dprtc_dev);
+       rte_free(dprtc_dev);
 
        return -1;
 }