Message ID | 20241215205358.4100142-1-zmw12306@gmail.com |
---|---|
State | New |
Headers | show |
Series | usb: gadget: m66592-udc: Add check for clk_enable() | expand |
diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c index a938b2af0944..bf408476a24c 100644 --- a/drivers/usb/gadget/udc/m66592-udc.c +++ b/drivers/usb/gadget/udc/m66592-udc.c @@ -1606,7 +1606,11 @@ static int m66592_probe(struct platform_device *pdev) ret = PTR_ERR(m66592->clk); goto clean_up2; } - clk_enable(m66592->clk); + ret = clk_enable(m66592->clk); + if (ret) { + clk_put(m66592->clk); + goto clean_up2; + } } INIT_LIST_HEAD(&m66592->gadget.ep_list);