From 6044ec8882c726e325017bd948aa0cd94ad33abc Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 7 Nov 2005 01:01:32 -0800 Subject: [PATCH] kfree cleanup: misc remaining drivers This is the remaining misc drivers/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in misc files in drivers/. Signed-off-by: Jesper Juhl Acked-by: Aristeu Sergio Rozanski Filho Acked-by: Roland Dreier Acked-by: Pierre Ossman Acked-by: Jean Delvare Acked-by: Greg Kroah-Hartman Acked-by: Len Brown Acked-by: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/pcmcia/cistpl.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'drivers/pcmcia/cistpl.c') diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 3afb682255a..2dc3e611a9a 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c @@ -334,10 +334,8 @@ void destroy_cis_cache(struct pcmcia_socket *s) /* * If there was a fake CIS, destroy that as well. */ - if (s->fake_cis) { - kfree(s->fake_cis); - s->fake_cis = NULL; - } + kfree(s->fake_cis); + s->fake_cis = NULL; } EXPORT_SYMBOL(destroy_cis_cache); @@ -386,10 +384,8 @@ int verify_cis_cache(struct pcmcia_socket *s) int pcmcia_replace_cis(struct pcmcia_socket *s, cisdump_t *cis) { - if (s->fake_cis != NULL) { - kfree(s->fake_cis); - s->fake_cis = NULL; - } + kfree(s->fake_cis); + s->fake_cis = NULL; if (cis->Length > CISTPL_MAX_CIS_SIZE) return CS_BAD_SIZE; s->fake_cis = kmalloc(cis->Length, GFP_KERNEL); -- cgit v1.2.3