diff options
| author | Tom Rini <[email protected]> | 2025-12-11 19:19:06 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-12-12 08:00:54 -0600 |
| commit | aff0f4d30ec6d7968578fc05fc6df6b5700d9913 (patch) | |
| tree | bf94298050837aecee2249adcc6e9a5d48d152ab /drivers | |
| parent | 802fbe0a287130c4800510ac6df3850c27606ff0 (diff) | |
Revert "clk: Return value calculated by ERR_PTR"
While this change was intended to fix a mistake in the code, of calling
the ERR_PTR macro but not making use of the result, it seems that
functionally platforms depend on the loop not existing here. The TI K3
families of platforms for example were broken by this commit.
This reverts commit fe780310cfa8bf5a093894b5cd7fe85c6b02fd91.
Reported-by: Nishanth Menon <[email protected]>
Reviewed-by: Andrew Goodbody <[email protected]>
Reviewed-by: Nishanth Menon <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/clk/clk-uclass.c | 4 | ||||
| -rw-r--r-- | drivers/clk/clk_sandbox.c | 17 |
2 files changed, 2 insertions, 19 deletions
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 4420651f765..0584429bed6 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @@ -199,7 +199,7 @@ static struct clk *clk_set_default_get_by_id(struct clk *clk) if (ret) { debug("%s(): could not get parent clock pointer, id %lu\n", __func__, clk->id); - return ERR_PTR(ret); + ERR_PTR(ret); } } @@ -354,7 +354,7 @@ static int clk_set_default_rates(struct udevice *dev, c = clk_set_default_get_by_id(&clk); if (IS_ERR(c)) - continue; + return PTR_ERR(c); ret = clk_set_rate(c, rates[index]); diff --git a/drivers/clk/clk_sandbox.c b/drivers/clk/clk_sandbox.c index cd92a6a29f5..c8c5a88c52d 100644 --- a/drivers/clk/clk_sandbox.c +++ b/drivers/clk/clk_sandbox.c @@ -8,23 +8,8 @@ #include <errno.h> #include <malloc.h> #include <asm/clk.h> -#include <dm/device-internal.h> #include <linux/clk-provider.h> -static int sandbox_clk_of_to_plat(struct udevice *dev) -{ - struct clk *clk; - struct sandbox_clk_priv *priv = dev_get_priv(dev); - - clk = &priv->clk; - - /* FIXME: This is not allowed */ - dev_set_uclass_priv(dev, clk); - - clk->dev = dev; - return 0; -} - static ulong sandbox_clk_get_rate(struct clk *clk) { struct sandbox_clk_priv *priv = dev_get_priv(clk->dev); @@ -117,7 +102,6 @@ static int sandbox_clk_request(struct clk *clk) if (id >= SANDBOX_CLK_ID_COUNT) return -EINVAL; - priv->clk.id = id; priv->requested[id] = true; return 0; } @@ -148,7 +132,6 @@ U_BOOT_DRIVER(sandbox_clk) = { .name = "sandbox_clk", .id = UCLASS_CLK, .of_match = sandbox_clk_ids, - .of_to_plat = sandbox_clk_of_to_plat, .ops = &sandbox_clk_ops, .probe = sandbox_clk_probe, .priv_auto = sizeof(struct sandbox_clk_priv), |
