summaryrefslogtreecommitdiffstats
path: root/drivers/usb/otg
diff options
context:
space:
mode:
authorSyam Sidhardhan <s.syam@samsung.com>2013-03-06 01:04:50 +0530
committerFelipe Balbi <balbi@ti.com>2013-03-18 11:18:01 +0200
commit5f71791947fcb1942df7d0df45520d420c2aee2b (patch)
treece114ad38c34faf2b885965899ffb021b9c75cc2 /drivers/usb/otg
parent2daf5966d140d23d1b5ba347b53d102eeb029d2c (diff)
downloadop-kernel-dev-5f71791947fcb1942df7d0df45520d420c2aee2b.zip
op-kernel-dev-5f71791947fcb1942df7d0df45520d420c2aee2b.tar.gz
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')
-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 d16adb4..37e8e15 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)
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 */
OpenPOWER on IntegriCloud