Skip to content

Commit 77006f6

Browse files
fancerbrgl
authored andcommitted
gpio: dwapb: Don't print error on -EPROBE_DEFER
Currently if the APB or Debounce clocks aren't yet ready to be requested the DW GPIO driver will correctly handle that by deferring the probe procedure, but the error is still printed to the system log. It needlessly pollutes the log since there was no real error but a request to postpone the clock request procedure since the clocks subsystem hasn't been fully initialized yet. Let's fix that by using the dev_err_probe method to print the APB/clock request error status. It will correctly handle the deferred probe situation and print the error if it actually happens. Signed-off-by: Serge Semin <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 7219b82 commit 77006f6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/gpio/gpio-dwapb.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,10 +662,9 @@ static int dwapb_get_clks(struct dwapb_gpio *gpio)
662662
gpio->clks[1].id = "db";
663663
err = devm_clk_bulk_get_optional(gpio->dev, DWAPB_NR_CLOCKS,
664664
gpio->clks);
665-
if (err) {
666-
dev_err(gpio->dev, "Cannot get APB/Debounce clocks\n");
667-
return err;
668-
}
665+
if (err)
666+
return dev_err_probe(gpio->dev, err,
667+
"Cannot get APB/Debounce clocks\n");
669668

670669
err = clk_bulk_prepare_enable(DWAPB_NR_CLOCKS, gpio->clks);
671670
if (err) {

0 commit comments

Comments
 (0)