Skip to content

Commit

Permalink
clk: tegra: emc: Replace BUG() with WARN_ONCE()
Browse files Browse the repository at this point in the history
There is no justification for the BUG() in this code.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Dmitry Osipenko authored and Stephen Boyd committed Apr 25, 2019
1 parent 913c307 commit f403765
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/clk/tegra/clk-emc.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ static int emc_set_timing(struct tegra_clk_emc *tegra,

if (emc_get_parent(&tegra->hw) == timing->parent_index &&
clk_get_rate(timing->parent) != timing->parent_rate) {
BUG();
WARN_ONCE(1, "parent %s rate mismatch %lu %lu\n",
__clk_get_name(timing->parent),
clk_get_rate(timing->parent),
timing->parent_rate);
return -EINVAL;
}

Expand Down

0 comments on commit f403765

Please sign in to comment.