summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorChen-Yu Tsai <wenst@chromium.org>2024-08-22 15:20:44 +0800
committerMark Brown <broonie@kernel.org>2024-08-22 13:34:28 +0100
commitad9d7a82901d9cea756b8666035b30ca41728e15 (patch)
treefbb19ab42192a3b4675e3037f104ff7a90faa826 /drivers/regulator
parent5a38089fe4438a587291ccf932178ed8cdbdde28 (diff)
regulator: Clarify error message for "id == NULL" in _regulator_get()
The original error message simply said "get() with no identifier" without any context as to what was requested or what device the request was related to. The only thing the user or developer could do was grep for the message in the full source tree. Amend the error message to be more specific, and also use dev_* to associate the error message with a device. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20240822072047.3097740-2-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 7674b7f2df14..9029de5395ee 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2183,7 +2183,7 @@ struct regulator *_regulator_get(struct device *dev, const char *id,
}
if (id == NULL) {
- pr_err("get() with no identifier\n");
+ dev_err(dev, "regulator request with no identifier\n");
return ERR_PTR(-EINVAL);
}