diff mbox

slip: fix wrong SLIP6 ifdef-endif placing

Message ID CAKh5nabf9OBG7yb5r=v0bhJLjNJgVrw-hVx9quJ9cwcOXSva=Q@mail.gmail.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Matvejchikov Ilya July 10, 2011, 6:32 p.m. UTC
SLIP6 have nothing to do with CSLIP so placing a block of
SLIP6-related code within a CSLIP ifdef-endif block is incorrect.

Signed-off-by: Ilya Matvejchikov <matvejchikov@gmail.com>
---
 drivers/net/slip.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Comments

David Miller July 10, 2011, 6:37 p.m. UTC | #1
From: Matvejchikov Ilya <matvejchikov@gmail.com>
Date: Sun, 10 Jul 2011 22:32:55 +0400

> SLIP6 have nothing to do with CSLIP so placing a block of
> SLIP6-related code within a CSLIP ifdef-endif block is incorrect.
> 
> Signed-off-by: Ilya Matvejchikov <matvejchikov@gmail.com>
 ...
> @@ -194,8 +194,7 @@ static int sl_alloc_bufs(struct slip *sl, int mtu)
>  err_exit:
>  #ifdef SL_INCLUDE_CSLIP
>  	kfree(cbuff);
> -	if (slcomp)
> -		slhc_free(slcomp);
> +	slhc_free(slcomp);
>  #endif

The change in this hunk has nothing to do with what you
claim to be doing in your commit message.

Don't mix unrelated changes together.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index 8ec1a9a..1ce6e08 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -182,11 +182,11 @@  static int sl_alloc_bufs(struct slip *sl, int mtu)
 #ifdef SL_INCLUDE_CSLIP
 	cbuff = xchg(&sl->cbuff, cbuff);
 	slcomp = xchg(&sl->slcomp, slcomp);
+#endif
 #ifdef CONFIG_SLIP_MODE_SLIP6
 	sl->xdata    = 0;
 	sl->xbits    = 0;
 #endif
-#endif
 	spin_unlock_bh(&sl->lock);
 	err = 0;

@@ -194,8 +194,7 @@  static int sl_alloc_bufs(struct slip *sl, int mtu)
 err_exit:
 #ifdef SL_INCLUDE_CSLIP
 	kfree(cbuff);
-	if (slcomp)
-		slhc_free(slcomp);
+	slhc_free(slcomp);
 #endif
 	kfree(xbuff);
 	kfree(rbuff);