]> git.ipfire.org Git - thirdparty/linux.git/commit
USB: pxa27x_udc: check return value of clk_enable
authorZhaoyang Yu <2426767509@qq.com>
Thu, 12 Mar 2026 11:03:29 +0000 (11:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2026 15:03:34 +0000 (16:03 +0100)
commitf2e9bc030d848f3a3d7d1cec23dd0308152eb551
tree6d5d32b1e49c84032b8bf9c1eea9146b75b8f4e0
parent0c8ee850572b6850a78ef4c83af2acd4909a4519
USB: pxa27x_udc: check return value of clk_enable

clk_enable() may fail according to the API contract.
Previously, udc_enable() ignored its return value and returned void.

Modify udc_enable() to return the error code. Additionally, update
all of its callers (pxa_udc_pullup, pxa_udc_vbus_session,
pxa27x_udc_start, pxa_udc_probe, and pxa_udc_resume) to check
this return value and handle the failure properly with necessary
cleanups or rollbacks.

Signed-off-by: Zhaoyang Yu <2426767509@qq.com>
Link: https://patch.msgid.link/tencent_46693FE6DB434ACFB7412B16F6078AC01A06@qq.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/pxa27x_udc.c