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:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
fotg210-core.c | ||
fotg210-hcd.c | ||
fotg210-hcd.h | ||
fotg210-udc.c | ||
fotg210-udc.h | ||
fotg210.h |