Skip to contentSkip to conversation

clk:davinci: make use of dev_err_cast_probe()

PATCH Applied Yuesong Li 3 participants 3 messages Aug 28, 2024

Subsystems (2)
lore
Share & tools
lore

Yuesong Li

author
#0 lore raw

PATCH 1/1 clk:davinci: make use of dev_err_cast_probe()

Using dev_err_cast_probe() to simplify the code.

---
 drivers/clk/davinci/da8xx-cfgchip.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/clk/davinci/da8xx-cfgchip.c +1 -2
index f6da66748573..a5109fe8b16e 100644
@@ -513,8 +513,7 @@ da8xx_cfgchip_register_usb0_clk48(struct device *dev,
 
 	fck_clk = devm_clk_get(dev, "fck");
 	if (IS_ERR(fck_clk)) {
-		dev_err_probe(dev, PTR_ERR(fck_clk), "Missing fck clock\n");
-		return ERR_CAST(fck_clk);
+		return dev_err_cast_probe(dev, fck_clk, "Missing fck clock\n");
 	}
 
 	usb0 = devm_kzalloc(dev, sizeof(*usb0), GFP_KERNEL);
Signature · 1 line
2.34.1