usb: otg: fsl_otg: remove redundant NULL check before kfree
authorSyam Sidhardhan <s.syam@samsung.com>
Tue, 5 Mar 2013 19:34:50 +0000 (01:04 +0530)
committerFelipe Balbi <balbi@ti.com>
Mon, 18 Mar 2013 09:18:01 +0000 (11:18 +0200)
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/otg/fsl_otg.c

index d16adb41eb21de144167fc3ad9d6acb5634f1508..37e8e1578316725b42b12f88a2b63ad87aed1dba 100644 (file)
@@ -361,28 +361,18 @@ int fsl_otg_init_timers(struct otg_fsm *fsm)
 void fsl_otg_uninit_timers(void)
 {
        /* FSM used timers */
-       if (a_wait_vrise_tmr != NULL)
-               kfree(a_wait_vrise_tmr);
-       if (a_wait_bcon_tmr != NULL)
-               kfree(a_wait_bcon_tmr);
-       if (a_aidl_bdis_tmr != NULL)
-               kfree(a_aidl_bdis_tmr);
-       if (b_ase0_brst_tmr != NULL)
-               kfree(b_ase0_brst_tmr);
-       if (b_se0_srp_tmr != NULL)
-               kfree(b_se0_srp_tmr);
-       if (b_srp_fail_tmr != NULL)
-               kfree(b_srp_fail_tmr);
-       if (a_wait_enum_tmr != NULL)
-               kfree(a_wait_enum_tmr);
+       kfree(a_wait_vrise_tmr);
+       kfree(a_wait_bcon_tmr);
+       kfree(a_aidl_bdis_tmr);
+       kfree(b_ase0_brst_tmr);
+       kfree(b_se0_srp_tmr);
+       kfree(b_srp_fail_tmr);
+       kfree(a_wait_enum_tmr);
 
        /* device driver used timers */
-       if (b_srp_wait_tmr != NULL)
-               kfree(b_srp_wait_tmr);
-       if (b_data_pulse_tmr != NULL)
-               kfree(b_data_pulse_tmr);
-       if (b_vbus_pulse_tmr != NULL)
-               kfree(b_vbus_pulse_tmr);
+       kfree(b_srp_wait_tmr);
+       kfree(b_data_pulse_tmr);
+       kfree(b_vbus_pulse_tmr);
 }
 
 /* Add timer to timer list */