ASoC: rsnd: fixup unsigned expression compared with zero: main_rate

This patch fixes this WARNING

sound/soc/sh/rcar/ssi.c:285:5-14: WARNING: Unsigned expression\
	compared with zero: main_rate < 0

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2017-06-16 00:02:59 +00:00 committed by Mark Brown
parent 8cc0372240
commit 947f4eb58d
3 changed files with 6 additions and 6 deletions

View File

@ -763,7 +763,7 @@ static int rsnd_soc_hw_rule(struct rsnd_priv *priv,
struct snd_interval *baseline, struct snd_interval *iv)
{
struct snd_interval p;
int rate;
unsigned int rate;
int i;
snd_interval_any(&p);

View File

@ -680,7 +680,7 @@ int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod);
void rsnd_parse_connect_ssi(struct rsnd_dai *rdai,
struct device_node *playback,
struct device_node *capture);
int rsnd_ssi_clk_query(struct rsnd_priv *priv,
unsigned int rsnd_ssi_clk_query(struct rsnd_priv *priv,
int param1, int param2, int *idx);
/*

View File

@ -208,14 +208,14 @@ u32 rsnd_ssi_multi_slaves_runtime(struct rsnd_dai_stream *io)
return 0;
}
int rsnd_ssi_clk_query(struct rsnd_priv *priv,
unsigned int rsnd_ssi_clk_query(struct rsnd_priv *priv,
int param1, int param2, int *idx)
{
int ssi_clk_mul_table[] = {
1, 2, 4, 8, 16, 6, 12,
};
int j, ret;
int main_rate;
unsigned int main_rate;
for (j = 0; j < ARRAY_SIZE(ssi_clk_mul_table); j++) {
@ -245,7 +245,7 @@ int rsnd_ssi_clk_query(struct rsnd_priv *priv,
return main_rate;
}
return -EINVAL;
return 0;
}
static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
@ -282,7 +282,7 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
}
main_rate = rsnd_ssi_clk_query(priv, rate, chan, &idx);
if (main_rate < 0) {
if (!main_rate) {
dev_err(dev, "unsupported clock rate\n");
return -EIO;
}