From: Mingwei Zheng <zmw12306@gmail.com>
To: gregkh@linuxfoundation.org
Cc: u.kleine-koenig@baylibre.com, aaro.koskinen@iki.fi, balbi@ti.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Mingwei Zheng <zmw12306@gmail.com>,
Jiasheng Jiang <jiashengjiangcool@gmail.com>
Subject: [PATCH v2] USB: phy: tahvo: Add check for clk_enable()
Date: Wed, 25 Dec 2024 20:35:00 -0500 [thread overview]
Message-ID: <20241226013500.684623-1-zmw12306@gmail.com> (raw)
The APP-Miner reported the missing check.
Add check for the return value of clk_enable() to catch the potential
error.
Fixes: 9ba96ae5074c ("usb: omap1: Tahvo USB transceiver driver")
Signed-off-by: Mingwei Zheng <zmw12306@gmail.com>
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
---
Changelog:
v1 -> v2
1. Add tool name in commit msg.
---
drivers/usb/phy/phy-tahvo.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-tahvo.c
index ae7bf3ff89ee..0b8801318cd2 100644
--- a/drivers/usb/phy/phy-tahvo.c
+++ b/drivers/usb/phy/phy-tahvo.c
@@ -342,8 +342,11 @@ static int tahvo_usb_probe(struct platform_device *pdev)
mutex_init(&tu->serialize);
tu->ick = devm_clk_get(&pdev->dev, "usb_l4_ick");
- if (!IS_ERR(tu->ick))
- clk_enable(tu->ick);
+ if (!IS_ERR(tu->ick)) {
+ ret = clk_enable(tu->ick);
+ if (ret)
+ return ret;
+ }
/*
* Set initial state, so that we generate kevents only on state changes.
--
2.34.1
next reply other threads:[~2024-12-26 1:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-26 1:35 Mingwei Zheng [this message]
2024-12-27 12:08 ` [PATCH v2] USB: phy: tahvo: Add check for clk_enable() 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=20241226013500.684623-1-zmw12306@gmail.com \
--to=zmw12306@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=balbi@ti.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