提交 5f717919 编写于 作者: S Syam Sidhardhan 提交者: Felipe Balbi

usb: otg: fsl_otg: remove redundant NULL check before kfree

kfree on NULL pointer is a no-op.
Signed-off-by: NSyam Sidhardhan <s.syam@samsung.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 2daf5966
...@@ -361,28 +361,18 @@ int fsl_otg_init_timers(struct otg_fsm *fsm) ...@@ -361,28 +361,18 @@ int fsl_otg_init_timers(struct otg_fsm *fsm)
void fsl_otg_uninit_timers(void) void fsl_otg_uninit_timers(void)
{ {
/* FSM used timers */ /* FSM used timers */
if (a_wait_vrise_tmr != NULL) kfree(a_wait_vrise_tmr);
kfree(a_wait_vrise_tmr); kfree(a_wait_bcon_tmr);
if (a_wait_bcon_tmr != NULL) kfree(a_aidl_bdis_tmr);
kfree(a_wait_bcon_tmr); kfree(b_ase0_brst_tmr);
if (a_aidl_bdis_tmr != NULL) kfree(b_se0_srp_tmr);
kfree(a_aidl_bdis_tmr); kfree(b_srp_fail_tmr);
if (b_ase0_brst_tmr != NULL) kfree(a_wait_enum_tmr);
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);
/* device driver used timers */ /* device driver used timers */
if (b_srp_wait_tmr != NULL) kfree(b_srp_wait_tmr);
kfree(b_srp_wait_tmr); kfree(b_data_pulse_tmr);
if (b_data_pulse_tmr != NULL) kfree(b_vbus_pulse_tmr);
kfree(b_data_pulse_tmr);
if (b_vbus_pulse_tmr != NULL)
kfree(b_vbus_pulse_tmr);
} }
/* Add timer to timer list */ /* Add timer to timer list */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册