Skip to content

Commit 5e93207

Browse files
fancerarndb
authored andcommitted
bus: bt1-axi: Don't print error on -EPROBE_DEFER
The Baikal-T1 AXI 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 be5cdde commit 5e93207

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

drivers/bus/bt1-axi.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ static int bt1_axi_request_rst(struct bt1_axi *axi)
135135
int ret;
136136

137137
axi->arst = devm_reset_control_get_optional_exclusive(axi->dev, "arst");
138-
if (IS_ERR(axi->arst)) {
139-
dev_warn(axi->dev, "Couldn't get reset control line\n");
140-
return PTR_ERR(axi->arst);
141-
}
138+
if (IS_ERR(axi->arst))
139+
return dev_err_probe(axi->dev, PTR_ERR(axi->arst),
140+
"Couldn't get reset control line\n");
142141

143142
ret = reset_control_deassert(axi->arst);
144143
if (ret)
@@ -159,10 +158,9 @@ static int bt1_axi_request_clk(struct bt1_axi *axi)
159158
int ret;
160159

161160
axi->aclk = devm_clk_get(axi->dev, "aclk");
162-
if (IS_ERR(axi->aclk)) {
163-
dev_err(axi->dev, "Couldn't get AXI Interconnect clock\n");
164-
return PTR_ERR(axi->aclk);
165-
}
161+
if (IS_ERR(axi->aclk))
162+
return dev_err_probe(axi->dev, PTR_ERR(axi->aclk),
163+
"Couldn't get AXI Interconnect clock\n");
166164

167165
ret = clk_prepare_enable(axi->aclk);
168166
if (ret) {

0 commit comments

Comments
 (0)