aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp_deflate.c
diff options
context:
space:
mode:
authorJesper Juhl <juhl-lkml@dif.dk>2005-05-03 17:38:09 -0400
committerDavid S. Miller <davem@davemloft.net>2005-05-03 17:38:09 -0400
commit96edf83c4e284c08584f97623f7c7f029759459e (patch)
tree966c927ce074efe743303a8004fda02f27dc1ad6 /drivers/net/ppp_deflate.c
parentc3924c70dd3bddc28b99ccd1688bd281bad1a9be (diff)
[PPP]: remove redundant NULL pointer checks before kfree & vfree
kfree() and vfree() can both deal with NULL pointers. This patch removes redundant NULL pointer checks from the ppp code in drivers/net/ Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp_deflate.c')
-rw-r--r--drivers/net/ppp_deflate.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ppp_deflate.c b/drivers/net/ppp_deflate.c
index 507d6328d4eb..3872088fdd10 100644
--- a/drivers/net/ppp_deflate.c
+++ b/drivers/net/ppp_deflate.c
@@ -87,8 +87,7 @@ static void z_comp_free(void *arg)
87 87
88 if (state) { 88 if (state) {
89 zlib_deflateEnd(&state->strm); 89 zlib_deflateEnd(&state->strm);
90 if (state->strm.workspace) 90 vfree(state->strm.workspace);
91 vfree(state->strm.workspace);
92 kfree(state); 91 kfree(state);
93 } 92 }
94} 93}
@@ -308,8 +307,7 @@ static void z_decomp_free(void *arg)
308 307
309 if (state) { 308 if (state) {
310 zlib_inflateEnd(&state->strm); 309 zlib_inflateEnd(&state->strm);
311 if (state->strm.workspace) 310 kfree(state->strm.workspace);
312 kfree(state->strm.workspace);
313 kfree(state); 311 kfree(state);
314 } 312 }
315} 313}