[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241215210006.4114454-1-zmw12306@gmail.com>
Date: Sun, 15 Dec 2024 16:00:06 -0500
From: Mingwei Zheng <zmw12306@...il.com>
To: gregkh@...uxfoundation.org,
u.kleine-koenig@...libre.com,
aaro.koskinen@....fi,
balbi@...com
Cc: linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org,
Mingwei Zheng <zmw12306@...il.com>,
Jiasheng Jiang <jiashengjiangcool@...il.com>
Subject: [PATCH] USB: phy: tahvo: Add check for clk_enable()
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@...il.com>
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@...il.com>
---
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
Powered by blists - more mailing lists