ls1012a, pfe_eth: correction in delay implementation
authorChaitanya Sakinam <chaitanya.sakinam@nxp.com>
Thu, 10 Sep 2020 11:20:53 +0000 (16:50 +0530)
committerPriyanka Jain <priyanka.jain@nxp.com>
Thu, 24 Sep 2020 15:27:32 +0000 (20:57 +0530)
correction in delay implementation before we exit out of tx timeout.

Signed-off-by: Chaitanya Sakinam <chaitanya.sakinam@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/net/pfe_eth/pfe_eth.c

index e49bf4a..b74974c 100644 (file)
@@ -176,9 +176,10 @@ static int pfe_eth_send(struct udevice *dev, void *packet, int length)
 
                udelay(100);
                i++;
-               if (i == 30000)
+               if (i == 30000) {
                        printf("Tx timeout, send failed\n");
-               break;
+                       break;
+               }
        }
 
        return 0;