Patchwork : core/gpio-pmf.c: 3 * redundant code

login
register
mail settings
Submitter d binderman
Date March 19, 2010, 10:12 a.m.
Message ID <BLU108-W15D28ACC0F582E99E06AC99C2A0@phx.gbl>
Download mbox | patch
Permalink /patch/48123/
State Accepted
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

d binderman - March 19, 2010, 10:12 a.m.

Patch


Signed-off-by: David Binderman <dcb314@hotmail.com>

--- aoa/core/gpio-pmf.c.sav	2010-03-19 10:07:30.000000000 +0000
+++ aoa/core/gpio-pmf.c	2010-03-19 10:07:40.000000000 +0000
@@ -115,12 +115,9 @@  static void pmf_gpio_exit(struct gpio_ru
 	mutex_destroy(&rt->line_in_notify.mutex);
 	mutex_destroy(&rt->line_out_notify.mutex);
 
-	if (rt->headphone_notify.gpio_private)
-		kfree(rt->headphone_notify.gpio_private);
-	if (rt->line_in_notify.gpio_private)
-		kfree(rt->line_in_notify.gpio_private);
-	if (rt->line_out_notify.gpio_private)
-		kfree(rt->line_out_notify.gpio_private);
+	kfree(rt->headphone_notify.gpio_private);
+	kfree(rt->line_in_notify.gpio_private);
+	kfree(rt->line_out_notify.gpio_private);
 }
 
 static void pmf_handle_notify_irq(void *data)