summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatvejchikov Ilya <matvejchikov@gmail.com>2011-07-12 21:46:17 +0000
committerDavid S. Miller <davem@davemloft.net>2011-07-13 02:31:39 -0700
commite28634d6b229dec216596298c765c203d6b6fa4c (patch)
treebc42b32c19e27e498f404f09e89572591ee3207c
parent30c5f8ecf246997d16ba5b11becc5f10f9deaf7a (diff)
downloadblackbird-op-linux-e28634d6b229dec216596298c765c203d6b6fa4c.tar.gz
blackbird-op-linux-e28634d6b229dec216596298c765c203d6b6fa4c.zip
slip: fix MTU comparation operation when reallocating buffers
In sl_realloc_bufs() there is no reason to check if the requested MTU greater than or equal to the current MTU value as this function called only when requested MTU not equals to the current value. So, the ">=" operation can be safely replaced with the ">". Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/slip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index e8c4582d9561..d724d47d254f 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -247,7 +247,7 @@ static int sl_realloc_bufs(struct slip *sl, int mtu)
#else
if (xbuff == NULL || rbuff == NULL) {
#endif
- if (mtu >= sl->mtu) {
+ if (mtu > sl->mtu) {
printk(KERN_WARNING "%s: unable to grow slip buffers, MTU change cancelled.\n",
dev->name);
err = -ENOBUFS;
OpenPOWER on IntegriCloud