Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andrew Halaney and committed by
Sebastian Reichel
8e511f42 a7d79bcc

+2 -2
+2 -2
drivers/power/reset/nvmem-reboot-mode.c
··· 45 45 46 46 nvmem_rbm->cell = devm_nvmem_cell_get(&pdev->dev, "reboot-mode"); 47 47 if (IS_ERR(nvmem_rbm->cell)) { 48 - dev_err(&pdev->dev, "failed to get the nvmem cell reboot-mode\n"); 49 - return PTR_ERR(nvmem_rbm->cell); 48 + return dev_err_probe(&pdev->dev, PTR_ERR(nvmem_rbm->cell), 49 + "failed to get the nvmem cell reboot-mode\n"); 50 50 } 51 51 52 52 ret = devm_reboot_mode_register(&pdev->dev, &nvmem_rbm->reboot);