From: Mingwei Zheng <zmw12306@gmail.com>
To: gregkh@linuxfoundation.org, u.kleine-koenig@baylibre.com
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Mingwei Zheng <zmw12306@gmail.com>,
Jiasheng Jiang <jiashengjiangcool@gmail.com>
Subject: [PATCH] usb: gadget: m66592-udc: Add check for clk_enable()
Date: Sun, 15 Dec 2024 15:53:58 -0500 [thread overview]
Message-ID: <20241215205358.4100142-1-zmw12306@gmail.com> (raw)
Add check for the return value of clk_enable() to catch the potential
error.
Fixes: b4822e2317e8 ("usb: gadget: m66592-udc: Convert to use module_platform_driver()")
Signed-off-by: Mingwei Zheng <zmw12306@gmail.com>
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
---
drivers/usb/gadget/udc/m66592-udc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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);
--
2.34.1
next reply other threads:[~2024-12-15 20:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-15 20:53 Mingwei Zheng [this message]
2024-12-16 7:55 ` [PATCH] usb: gadget: m66592-udc: Add check for clk_enable() Greg KH
2024-12-18 3:06 ` Mingwei Zheng
2024-12-23 17:30 ` Greg KH
2024-12-26 1:35 ` Mingwei Zheng
-- strict thread matches above, loose matches on Subject: below --
2024-12-24 20:22 Mingwei Zheng
2024-12-26 8:19 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241215205358.4100142-1-zmw12306@gmail.com \
--to=zmw12306@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jiashengjiangcool@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox