]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: fec: don't skip check of num-rx-queues, when num-tx-queues is out of range
authorLothar Waßmann <LW@KARO-electronics.de>
Tue, 10 Oct 2017 12:01:20 +0000 (14:01 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 10 Oct 2017 12:01:20 +0000 (14:01 +0200)
There is no need to return from fec_enet_get_queue_num(), skipping the
check for num-rx-queues, when the value of num-tx-queues specified in
DT is invalid.
Furthermore print the name of the DT property set by the user, rather
than the driver's internal variable name in the warning message.

drivers/net/ethernet/freescale/fec_main.c

index a6e323f1563745c3a0cedd91d240e05af6606f33..c1160ae22f94f3037ca2c71debac0406d51c02ca 100644 (file)
@@ -3294,19 +3294,16 @@ fec_enet_get_queue_num(struct platform_device *pdev, int *num_tx, int *num_rx)
        of_property_read_u32(np, "fsl,num-rx-queues", num_rx);
 
        if (*num_tx < 1 || *num_tx > FEC_ENET_MAX_TX_QS) {
-               dev_warn(&pdev->dev, "Invalid num_tx(=%d), fall back to 1\n",
+               dev_warn(&pdev->dev, "Invalid fsl,num-tx-queues value %d; fall back to 1\n",
                         *num_tx);
                *num_tx = 1;
-               return;
        }
 
        if (*num_rx < 1 || *num_rx > FEC_ENET_MAX_RX_QS) {
-               dev_warn(&pdev->dev, "Invalid num_rx(=%d), fall back to 1\n",
+               dev_warn(&pdev->dev, "Invalid fsl,num-rx-queues value %d; fall back to 1\n",
                         *num_rx);
                *num_rx = 1;
-               return;
        }
-
 }
 
 static int