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

bus: bt1-apb: Don't print error on -EPROBE_DEFER

The Baikal-T1 APB bus driver correctly handles the deferred probe
situation, but still pollutes the system log with a misleading error
message. Let's fix that by using the dev_err_probe() method to print the
log message in case of the clocks/resets request errors.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Link: https://lore.kernel.org/r/20220610104030.28399-1-Sergey.Semin@baikalelectronics.ru'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Serge Semin and committed by
Arnd Bergmann
be5cddef 96589042

+6 -8
+6 -8
drivers/bus/bt1-apb.c
··· 175 175 int ret; 176 176 177 177 apb->prst = devm_reset_control_get_optional_exclusive(apb->dev, "prst"); 178 - if (IS_ERR(apb->prst)) { 179 - dev_warn(apb->dev, "Couldn't get reset control line\n"); 180 - return PTR_ERR(apb->prst); 181 - } 178 + if (IS_ERR(apb->prst)) 179 + return dev_err_probe(apb->dev, PTR_ERR(apb->prst), 180 + "Couldn't get reset control line\n"); 182 181 183 182 ret = reset_control_deassert(apb->prst); 184 183 if (ret) ··· 198 199 int ret; 199 200 200 201 apb->pclk = devm_clk_get(apb->dev, "pclk"); 201 - if (IS_ERR(apb->pclk)) { 202 - dev_err(apb->dev, "Couldn't get APB clock descriptor\n"); 203 - return PTR_ERR(apb->pclk); 204 - } 202 + if (IS_ERR(apb->pclk)) 203 + return dev_err_probe(apb->dev, PTR_ERR(apb->pclk), 204 + "Couldn't get APB clock descriptor\n"); 205 205 206 206 ret = clk_prepare_enable(apb->pclk); 207 207 if (ret) {