slip: fix MTU comparation operation when reallocating buffers
authorMatvejchikov Ilya <matvejchikov@gmail.com>
Tue, 12 Jul 2011 21:46:17 +0000 (21:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Jul 2011 09:31:39 +0000 (02:31 -0700)
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>
drivers/net/slip.c

index e8c4582d9561ebffcdb793f63444de7ef252343a..d724d47d254f18507a56024116ac1b802e9cae43 100644 (file)
@@ -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;