[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKh5nabAU=nYJdcbM55J=FDhcrZgW4G+vOBuOjT8TwniT457Jg@mail.gmail.com>
Date: Wed, 13 Jul 2011 11:46:17 +0400
From: Matvejchikov Ilya <matvejchikov@...il.com>
To: netdev@...r.kernel.org
Cc: matvejchikov@...il.com
Subject: [PATCH 2/4] 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@...il.com>
---
drivers/net/slip.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index e8c4582..d724d47 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;
--
1.7.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists