* Re: ASoC: rsnd: show debug message for SSI/SRC/DVC connection
@ 2015-07-20 21:45 Dan Carpenter
2015-07-21 0:03 ` [PATCH] ASoC: rsnd: tidyup parameter assignment position Kuninori Morimoto
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2015-07-20 21:45 UTC (permalink / raw)
To: kuninori.morimoto.gx; +Cc: alsa-devel
Hello Kuninori Morimoto,
This is a semi-automatic email about new static checker warnings.
The patch 84e95355602c: "ASoC: rsnd: show debug message for
SSI/SRC/DVC connection" from Jul 15, 2015, leads to the following
Smatch complaint:
sound/soc/sh/rcar/core.c:338 rsnd_dai_connect()
warn: variable dereferenced before check 'mod' (see line 335)
sound/soc/sh/rcar/core.c
334 {
335 struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
^^^^^^^^^^^^^^^^^^^^^
Patch adds new dereference.
336 struct device *dev = rsnd_priv_to_dev(priv);
337
338 if (!mod)
^^^^
Existing code assumed "mod" could be NULL.
339 return -EIO;
340
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ASoC: rsnd: tidyup parameter assignment position
2015-07-20 21:45 ASoC: rsnd: show debug message for SSI/SRC/DVC connection Dan Carpenter
@ 2015-07-21 0:03 ` Kuninori Morimoto
2015-07-21 10:49 ` Applied "ASoC: rsnd: tidyup parameter assignment position" to the asoc tree Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Kuninori Morimoto @ 2015-07-21 0:03 UTC (permalink / raw)
To: Mark Brown, Dan Carpenter; +Cc: Linux-ALSA, Simon, Liam Girdwood
84e95355602c("ASoC: rsnd: show debug message for SSI/SRC/DVC connection")
added debug message on rsnd_dai_connect(), but the relationship of
parameter check was absurdity. This patch tidyup it.
It is reported via Smatch/Dan
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/sh/rcar/core.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 927a7b0..f3feed5 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -332,12 +332,15 @@ u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
static int rsnd_dai_connect(struct rsnd_mod *mod,
struct rsnd_dai_stream *io)
{
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct device *dev = rsnd_priv_to_dev(priv);
+ struct rsnd_priv *priv;
+ struct device *dev;
if (!mod)
return -EIO;
+ priv = rsnd_mod_to_priv(mod);
+ dev = rsnd_priv_to_dev(priv);
+
io->mod[mod->type] = mod;
dev_dbg(dev, "%s[%d] is connected to io (%s)\n",
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Applied "ASoC: rsnd: tidyup parameter assignment position" to the asoc tree
2015-07-21 0:03 ` [PATCH] ASoC: rsnd: tidyup parameter assignment position Kuninori Morimoto
@ 2015-07-21 10:49 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-07-21 10:49 UTC (permalink / raw)
To: Dan Carpenter, Kuninori Morimoto, Mark Brown; +Cc: alsa-devel
The patch
ASoC: rsnd: tidyup parameter assignment position
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 48725e9cc841da395bfd74e7691bba91613d3517 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Tue, 21 Jul 2015 00:03:35 +0000
Subject: [PATCH] ASoC: rsnd: tidyup parameter assignment position
84e95355602c("ASoC: rsnd: show debug message for SSI/SRC/DVC connection")
added debug message on rsnd_dai_connect(), but the relationship of
parameter check was absurdity. This patch tidyup it.
It is reported via Smatch/Dan
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/sh/rcar/core.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 927a7b02123b..f3feed5ce9b6 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -332,12 +332,15 @@ u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
static int rsnd_dai_connect(struct rsnd_mod *mod,
struct rsnd_dai_stream *io)
{
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct device *dev = rsnd_priv_to_dev(priv);
+ struct rsnd_priv *priv;
+ struct device *dev;
if (!mod)
return -EIO;
+ priv = rsnd_mod_to_priv(mod);
+ dev = rsnd_priv_to_dev(priv);
+
io->mod[mod->type] = mod;
dev_dbg(dev, "%s[%d] is connected to io (%s)\n",
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-21 10:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-20 21:45 ASoC: rsnd: show debug message for SSI/SRC/DVC connection Dan Carpenter
2015-07-21 0:03 ` [PATCH] ASoC: rsnd: tidyup parameter assignment position Kuninori Morimoto
2015-07-21 10:49 ` Applied "ASoC: rsnd: tidyup parameter assignment position" to the asoc tree Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.