Skip to content

Commit be5cdde

Browse files
fancerarndb
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected]' Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 9658904 commit be5cdde

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

drivers/bus/bt1-apb.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,9 @@ static int bt1_apb_request_rst(struct bt1_apb *apb)
175175
int ret;
176176

177177
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");
182181

183182
ret = reset_control_deassert(apb->prst);
184183
if (ret)
@@ -199,10 +198,9 @@ static int bt1_apb_request_clk(struct bt1_apb *apb)
199198
int ret;
200199

201200
apb->pclk = devm_clk_get(apb->dev, "pclk");
202-
if (IS_ERR(apb->pclk)) {
203-
dev_err(apb->dev, "Couldn't get APB clock descriptor\n");
204-
return PTR_ERR(apb->pclk);
205-
}
201+
if (IS_ERR(apb->pclk))
202+
return dev_err_probe(apb->dev, PTR_ERR(apb->pclk),
203+
"Couldn't get APB clock descriptor\n");
206204

207205
ret = clk_prepare_enable(apb->pclk);
208206
if (ret) {

0 commit comments

Comments
 (0)