diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:02 -0500 |
commit | 3c7208f253571ee5f157b98f0e315b5172afe092 (patch) | |
tree | e4c29817e4c097d8de9ef025b600d753d06a155e /drivers/isdn/hisax/netjet.c | |
parent | 735d5661d5c5f023a78fbe68e771e261040ff1b7 (diff) |
[PATCH] kfree cleanup: drivers/isdn
This is the drivers/isdn/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in drivers/isdn/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/hisax/netjet.c')
-rw-r--r-- | drivers/isdn/hisax/netjet.c | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/drivers/isdn/hisax/netjet.c b/drivers/isdn/hisax/netjet.c index 94da03c30c51..47a47ef0968b 100644 --- a/drivers/isdn/hisax/netjet.c +++ b/drivers/isdn/hisax/netjet.c | |||
@@ -855,14 +855,10 @@ close_tigerstate(struct BCState *bcs) | |||
855 | { | 855 | { |
856 | mode_tiger(bcs, 0, bcs->channel); | 856 | mode_tiger(bcs, 0, bcs->channel); |
857 | if (test_and_clear_bit(BC_FLG_INIT, &bcs->Flag)) { | 857 | if (test_and_clear_bit(BC_FLG_INIT, &bcs->Flag)) { |
858 | if (bcs->hw.tiger.rcvbuf) { | 858 | kfree(bcs->hw.tiger.rcvbuf); |
859 | kfree(bcs->hw.tiger.rcvbuf); | 859 | bcs->hw.tiger.rcvbuf = NULL; |
860 | bcs->hw.tiger.rcvbuf = NULL; | 860 | kfree(bcs->hw.tiger.sendbuf); |
861 | } | 861 | bcs->hw.tiger.sendbuf = NULL; |
862 | if (bcs->hw.tiger.sendbuf) { | ||
863 | kfree(bcs->hw.tiger.sendbuf); | ||
864 | bcs->hw.tiger.sendbuf = NULL; | ||
865 | } | ||
866 | skb_queue_purge(&bcs->rqueue); | 862 | skb_queue_purge(&bcs->rqueue); |
867 | skb_queue_purge(&bcs->squeue); | 863 | skb_queue_purge(&bcs->squeue); |
868 | if (bcs->tx_skb) { | 864 | if (bcs->tx_skb) { |
@@ -967,20 +963,12 @@ inittiger(struct IsdnCardState *cs) | |||
967 | static void | 963 | static void |
968 | releasetiger(struct IsdnCardState *cs) | 964 | releasetiger(struct IsdnCardState *cs) |
969 | { | 965 | { |
970 | if (cs->bcs[0].hw.tiger.send) { | 966 | kfree(cs->bcs[0].hw.tiger.send); |
971 | kfree(cs->bcs[0].hw.tiger.send); | 967 | cs->bcs[0].hw.tiger.send = NULL; |
972 | cs->bcs[0].hw.tiger.send = NULL; | 968 | cs->bcs[1].hw.tiger.send = NULL; |
973 | } | 969 | kfree(cs->bcs[0].hw.tiger.rec); |
974 | if (cs->bcs[1].hw.tiger.send) { | 970 | cs->bcs[0].hw.tiger.rec = NULL; |
975 | cs->bcs[1].hw.tiger.send = NULL; | 971 | cs->bcs[1].hw.tiger.rec = NULL; |
976 | } | ||
977 | if (cs->bcs[0].hw.tiger.rec) { | ||
978 | kfree(cs->bcs[0].hw.tiger.rec); | ||
979 | cs->bcs[0].hw.tiger.rec = NULL; | ||
980 | } | ||
981 | if (cs->bcs[1].hw.tiger.rec) { | ||
982 | cs->bcs[1].hw.tiger.rec = NULL; | ||
983 | } | ||
984 | } | 972 | } |
985 | 973 | ||
986 | void | 974 | void |