[PATCH v1] clk:davinci: make use of dev_err_cast_probe()

Yuesong Li posted 1 patch 1 year, 3 months ago
drivers/clk/davinci/da8xx-cfgchip.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH v1] clk:davinci: make use of dev_err_cast_probe()
Posted by Yuesong Li 1 year, 3 months ago
Using dev_err_cast_probe() to simplify the code.

Signed-off-by: Yuesong Li <liyuesong@vivo.com>
---
 drivers/clk/davinci/da8xx-cfgchip.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clk/davinci/da8xx-cfgchip.c b/drivers/clk/davinci/da8xx-cfgchip.c
index f6da66748573..a5109fe8b16e 100644
--- a/drivers/clk/davinci/da8xx-cfgchip.c
+++ b/drivers/clk/davinci/da8xx-cfgchip.c
@@ -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);
-- 
2.34.1
Re: [PATCH v1] clk:davinci: make use of dev_err_cast_probe()
Posted by Stephen Boyd 1 year, 3 months ago
Quoting Yuesong Li (2024-08-28 00:35:15)
> Using dev_err_cast_probe() to simplify the code.
> 
> Signed-off-by: Yuesong Li <liyuesong@vivo.com>
> ---

Applied to clk-next
Re: [PATCH v1] clk:davinci: make use of dev_err_cast_probe()
Posted by David Lechner 1 year, 3 months ago
On 8/28/24 2:35 AM, Yuesong Li wrote:
> Using dev_err_cast_probe() to simplify the code.
> 
> Signed-off-by: Yuesong Li <liyuesong@vivo.com>
> ---

Reviewed-by: David Lechner <david@lechnology.com>