diff options
| author | Nicholas Mc Guire <hofrat@osadl.org> | 2018-08-30 12:16:58 +0200 |
|---|---|---|
| committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-10-02 10:43:08 +0300 |
| commit | 4ab2b48c98f2ec9712452d520a381917f91ac3d2 (patch) | |
| tree | 03c0a5bb89ddc72cc1ae4d854c81dcafd6ada70a /tools/perf/scripts/python | |
| parent | usb: mtu3: disable vbus rise/fall interrupts of ltssm (diff) | |
| download | linux-4ab2b48c98f2ec9712452d520a381917f91ac3d2.tar.gz linux-4ab2b48c98f2ec9712452d520a381917f91ac3d2.zip | |
usb: gadget: fsl_udc_core: check allocation return value and cleanup on failure
The allocation with fsl_alloc_request() and kmalloc() were unchecked
fixed this up with a NULL check and appropriate cleanup.
Additionally udc->ep_qh_size was reset to 0 on failure of allocation.
Similar udc->phy_mode is initially 0 (as udc_controller was
allocated with kzalloc in fsl_udc_probe()) so reset it to 0 as well
so that this function is side-effect free on failure. Not clear if
this is necessary or sensible as fsl_udc_release() probably can not
be called if fsl_udc_probe() failed - but it should not hurt.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: b504882da5 ("USB: add Freescale high-speed USB SOC device controller driver")
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
