Skip to contentSkip to conversation

clk: bulk: Use dev_err_probe() helper in __clk_bulk_get()

PATCH Applied Yang Yingliang 2 participants 2 messages Sep 13, 2022 – Oct 17, 2022 Common clk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: bulk: Use dev_err_probe() helper in __clk_bulk_get()

dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER.

---
 drivers/clk/clk-bulk.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/clk-bulk.c +3 -3
index e9e16425c739..826b3ff99433 100644
@@ -96,9 +96,9 @@ static int __clk_bulk_get(struct device *dev, int num_clks,
 			if (ret == -ENOENT && optional)
 				continue;
 
-			if (ret != -EPROBE_DEFER)
-				dev_err(dev, "Failed to get clk '%s': %d\n",
-					clks[i].id, ret);
+			dev_err_probe(dev, ret,
+				      "Failed to get clk '%s'\n",
+				      clks[i].id);
 			goto err;
 		}
 	}
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw

Quoting Yang Yingliang (2022-09-12 20:24:03)

Quoted 5 lines

dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER.

---

Applied to clk-next