diff options
author | Andrew Halaney <ahalaney@redhat.com> | 2023-08-17 16:41:57 -0500 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2023-09-12 20:15:28 +0200 |
commit | 8e511f42ac9cdab84c692bcd0f9e0c55c75b1856 (patch) | |
tree | f8f52d7843404a4292430e04618255282487b3c2 /drivers | |
parent | a7d79bcc8364483b0d39c944d72b425cf06eccc5 (diff) | |
download | linux-stable-8e511f42ac9cdab84c692bcd0f9e0c55c75b1856.tar.gz linux-stable-8e511f42ac9cdab84c692bcd0f9e0c55c75b1856.tar.bz2 linux-stable-8e511f42ac9cdab84c692bcd0f9e0c55c75b1856.zip |
power: reset: nvmem-reboot-mode: quiet some device deferrals
Some errors are being logged that are really due to deferrals,
which is confusing to users. Use dev_err_probe() to handle when to log
at error level versus debug. This also has the added bonuses of logging
to devices_deferred and printing the error value.
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Tested-by: Brian Masney <bmasney@redhat.com>
Link: https://lore.kernel.org/r/20230817214218.638846-1-ahalaney@redhat.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/reset/nvmem-reboot-mode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/reset/nvmem-reboot-mode.c b/drivers/power/reset/nvmem-reboot-mode.c index e229308d43e2..41530b70cfc4 100644 --- a/drivers/power/reset/nvmem-reboot-mode.c +++ b/drivers/power/reset/nvmem-reboot-mode.c @@ -45,8 +45,8 @@ static int nvmem_reboot_mode_probe(struct platform_device *pdev) nvmem_rbm->cell = devm_nvmem_cell_get(&pdev->dev, "reboot-mode"); if (IS_ERR(nvmem_rbm->cell)) { - dev_err(&pdev->dev, "failed to get the nvmem cell reboot-mode\n"); - return PTR_ERR(nvmem_rbm->cell); + return dev_err_probe(&pdev->dev, PTR_ERR(nvmem_rbm->cell), + "failed to get the nvmem cell reboot-mode\n"); } ret = devm_reboot_mode_register(&pdev->dev, &nvmem_rbm->reboot); |