summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/ssi.c
diff options
context:
space:
mode:
authorKuninori Morimoto2017-06-16 02:02:59 +0200
committerMark Brown2017-06-21 13:14:04 +0200
commit947f4eb58d2054b10a1d8146d0ab90b0e7fd3494 (patch)
treeefb22b113d41a780077bae2dc787397a53e90090 /sound/soc/sh/rcar/ssi.c
parentASoC: rsnd: add rsnd_soc_hw_rule/constraint() (diff)
downloadkernel-qcow2-linux-947f4eb58d2054b10a1d8146d0ab90b0e7fd3494.tar.gz
kernel-qcow2-linux-947f4eb58d2054b10a1d8146d0ab90b0e7fd3494.tar.xz
kernel-qcow2-linux-947f4eb58d2054b10a1d8146d0ab90b0e7fd3494.zip
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>
Diffstat (limited to 'sound/soc/sh/rcar/ssi.c')
-rw-r--r--sound/soc/sh/rcar/ssi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index c8956c3484dd..46feddd78ee2 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -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;
}