diff mbox series

[v2] USB: phy: tahvo: Add check for clk_enable()

Message ID 20241226013500.684623-1-zmw12306@gmail.com (mailing list archive)
State New
Headers show
Series [v2] USB: phy: tahvo: Add check for clk_enable() | expand

Commit Message

Mingwei Zheng Dec. 26, 2024, 1:35 a.m. UTC
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(-)

Comments

Greg KH Dec. 27, 2024, 12:08 p.m. UTC | #1
On Wed, Dec 25, 2024 at 08:35:00PM -0500, Mingwei Zheng wrote:
> The APP-Miner reported the missing check.
> Add check for the return value of clk_enable() to catch the potential
> error.

You did NOT answer all of the questions required as documented in the
./Documentation/process/researcher-guidelines.rst file, so I can't take
this, sorry.

greg k-h
diff mbox series

Patch

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.