mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
0cd142b466
In fotg210_udc_probe(), if devm_clk_get() or clk_prepare_enable()
fails, 'fotg210' will not be freed, which will lead to a memory leak.
Fix it by moving kfree() to a proper location.
In addition,we can use "return -ENOMEM" instead of "goto err"
to simplify the code.
Fixes:
|
||
---|---|---|
.. | ||
fotg210-core.c | ||
fotg210-hcd.c | ||
fotg210-hcd.h | ||
fotg210-udc.c | ||
fotg210-udc.h | ||
fotg210.h | ||
Kconfig | ||
Makefile |