diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:05 -0500 |
commit | 6044ec8882c726e325017bd948aa0cd94ad33abc (patch) | |
tree | 3bfc5dc93434e8ad556540f6689abcd2699aa45d /drivers/parport/share.c | |
parent | 2ea7533060e361810c21b2f5ee02151c4dfb85d8 (diff) |
[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 <jesper.juhl@gmail.com>
Acked-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
Acked-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Len Brown <len.brown@intel.com>
Acked-by: "Antonino A. Daplas" <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/parport/share.c')
-rw-r--r-- | drivers/parport/share.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/parport/share.c b/drivers/parport/share.c index ae7becf7efa5..9cb3ab156b09 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c | |||
@@ -202,16 +202,11 @@ static void free_port (struct parport *port) | |||
202 | list_del(&port->full_list); | 202 | list_del(&port->full_list); |
203 | spin_unlock(&full_list_lock); | 203 | spin_unlock(&full_list_lock); |
204 | for (d = 0; d < 5; d++) { | 204 | for (d = 0; d < 5; d++) { |
205 | if (port->probe_info[d].class_name) | 205 | kfree(port->probe_info[d].class_name); |
206 | kfree (port->probe_info[d].class_name); | 206 | kfree(port->probe_info[d].mfr); |
207 | if (port->probe_info[d].mfr) | 207 | kfree(port->probe_info[d].model); |
208 | kfree (port->probe_info[d].mfr); | 208 | kfree(port->probe_info[d].cmdset); |
209 | if (port->probe_info[d].model) | 209 | kfree(port->probe_info[d].description); |
210 | kfree (port->probe_info[d].model); | ||
211 | if (port->probe_info[d].cmdset) | ||
212 | kfree (port->probe_info[d].cmdset); | ||
213 | if (port->probe_info[d].description) | ||
214 | kfree (port->probe_info[d].description); | ||
215 | } | 210 | } |
216 | 211 | ||
217 | kfree(port->name); | 212 | kfree(port->name); |
@@ -618,9 +613,9 @@ parport_register_device(struct parport *port, const char *name, | |||
618 | return tmp; | 613 | return tmp; |
619 | 614 | ||
620 | out_free_all: | 615 | out_free_all: |
621 | kfree (tmp->state); | 616 | kfree(tmp->state); |
622 | out_free_pardevice: | 617 | out_free_pardevice: |
623 | kfree (tmp); | 618 | kfree(tmp); |
624 | out: | 619 | out: |
625 | parport_put_port (port); | 620 | parport_put_port (port); |
626 | module_put(port->ops->owner); | 621 | module_put(port->ops->owner); |