summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-01-06 12:58:09 +0300
committerDavid S. Miller <davem@davemloft.net>2016-01-06 15:28:11 -0500
commite06a03bdf8781d6a93a13d5bdf33d058ca498a86 (patch)
tree70407577b73c27610710839acaeafcb7d908b6b8 /drivers
parent719255d0e29463ddba2d01a72c1e74092793103a (diff)
downloadlinux-e06a03bdf8781d6a93a13d5bdf33d058ca498a86.tar.bz2
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: 57ba4c9b56d8 ('fsl/fman: Add FMan MAC support') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/freescale/fman/fman_dtsec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
index d78e2ba73ffa..587f9b40cfaa 100644
--- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c
+++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c
@@ -934,7 +934,7 @@ int dtsec_set_tx_pause_frames(struct fman_mac *dtsec,
/* FM_BAD_TX_TS_IN_B_2_B_ERRATA_DTSEC_A003 Errata workaround */
if (dtsec->fm_rev_info.major == 2)
- if (pause_time < 0 && pause_time <= 320) {
+ if (pause_time <= 320) {
pr_warn("pause-time: %d illegal.Should be > 320\n",
pause_time);
return -EINVAL;