aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/otg/fsl_otg.c
diff options
context:
space:
mode:
authorSyam Sidhardhan <s.syam@samsung.com>2013-03-05 14:34:50 -0500
committerFelipe Balbi <balbi@ti.com>2013-03-18 05:18:01 -0400
commit5f71791947fcb1942df7d0df45520d420c2aee2b (patch)
treece114ad38c34faf2b885965899ffb021b9c75cc2 /drivers/usb/otg/fsl_otg.c
parent2daf5966d140d23d1b5ba347b53d102eeb029d2c (diff)
usb: otg: fsl_otg: remove redundant NULL check before kfree
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>
Diffstat (limited to 'drivers/usb/otg/fsl_otg.c')
-rw-r--r--drivers/usb/otg/fsl_otg.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/drivers/usb/otg/fsl_otg.c b/drivers/usb/otg/fsl_otg.c
index d16adb41eb21..37e8e1578316 100644
--- a/drivers/usb/otg/fsl_otg.c
+++ b/drivers/usb/otg/fsl_otg.c
@@ -361,28 +361,18 @@ int fsl_otg_init_timers(struct otg_fsm *fsm)
361void fsl_otg_uninit_timers(void) 361void fsl_otg_uninit_timers(void)
362{ 362{
363 /* FSM used timers */ 363 /* FSM used timers */
364 if (a_wait_vrise_tmr != NULL) 364 kfree(a_wait_vrise_tmr);
365 kfree(a_wait_vrise_tmr); 365 kfree(a_wait_bcon_tmr);
366 if (a_wait_bcon_tmr != NULL) 366 kfree(a_aidl_bdis_tmr);
367 kfree(a_wait_bcon_tmr); 367 kfree(b_ase0_brst_tmr);
368 if (a_aidl_bdis_tmr != NULL) 368 kfree(b_se0_srp_tmr);
369 kfree(a_aidl_bdis_tmr); 369 kfree(b_srp_fail_tmr);
370 if (b_ase0_brst_tmr != NULL) 370 kfree(a_wait_enum_tmr);
371 kfree(b_ase0_brst_tmr);
372 if (b_se0_srp_tmr != NULL)
373 kfree(b_se0_srp_tmr);
374 if (b_srp_fail_tmr != NULL)
375 kfree(b_srp_fail_tmr);
376 if (a_wait_enum_tmr != NULL)
377 kfree(a_wait_enum_tmr);
378 371
379 /* device driver used timers */ 372 /* device driver used timers */
380 if (b_srp_wait_tmr != NULL) 373 kfree(b_srp_wait_tmr);
381 kfree(b_srp_wait_tmr); 374 kfree(b_data_pulse_tmr);
382 if (b_data_pulse_tmr != NULL) 375 kfree(b_vbus_pulse_tmr);
383 kfree(b_data_pulse_tmr);
384 if (b_vbus_pulse_tmr != NULL)
385 kfree(b_vbus_pulse_tmr);
386} 376}
387 377
388/* Add timer to timer list */ 378/* Add timer to timer list */