Skip to content

Commit e06a03b

Browse files
Dan Carpenterdavem330
authored andcommitted
fsl/fman: fix the pause_time test
pause_time is unsigned so it can't be less than zero. The bug means that we allow invalid pause-times. Fixes: 57ba4c9 ('fsl/fman: Add FMan MAC support') Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 719255d commit e06a03b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/freescale/fman/fman_dtsec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ int dtsec_set_tx_pause_frames(struct fman_mac *dtsec,
934934

935935
/* FM_BAD_TX_TS_IN_B_2_B_ERRATA_DTSEC_A003 Errata workaround */
936936
if (dtsec->fm_rev_info.major == 2)
937-
if (pause_time < 0 && pause_time <= 320) {
937+
if (pause_time <= 320) {
938938
pr_warn("pause-time: %d illegal.Should be > 320\n",
939939
pause_time);
940940
return -EINVAL;

0 commit comments

Comments
 (0)