ASoC: tegra: Simplify code around clk_get_rate() handling
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 8 Jun 2023 05:27:22 +0000 (07:27 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 8 Jun 2023 10:36:27 +0000 (11:36 +0100)
commit41a343cd6b7f8d0f70dd90c236086ccf8a84a7de
treeb8468dc46a5412a2687c21e8a8f38b08e855b2bd
parent3b3a8d6d34a3ace4d49beb6f69ebb0d3cfaf0479
ASoC: tegra: Simplify code around clk_get_rate() handling

clk_get_rate() returns an unsigned long, so there is no point in storing it
in a long, and test for negative values.

So, turn 'parent_rate' into an unsigned long, simplify the sanity check,
the error message and the return value, in case of error (i.e. 0).

Doing so also turns 'i' and 'valid_rates' into unsigned long, but it is
fine and harmless.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/53f928290f08f50ff43031e17fe1d88443c2c441.1686202022.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/tegra/tegra20_i2s.c
sound/soc/tegra/tegra20_spdif.c