Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f717919 authored by Syam Sidhardhan's avatar Syam Sidhardhan Committed by Felipe Balbi
Browse files

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



kfree on NULL pointer is a no-op.

Signed-off-by: default avatarSyam Sidhardhan <s.syam@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 2daf5966
Loading
Loading
Loading
Loading
+10 −20
Original line number Diff line number Diff line
@@ -361,27 +361,17 @@ 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);

	/* 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);
}