* [bug report] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers
@ 2020-04-24 10:20 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-04-24 10:20 UTC (permalink / raw)
To: shengjiu.wang; +Cc: alsa-devel
Hello Shengjiu Wang,
This is a semi-automatic email about new static checker warnings.
The patch 955ac624058f: "ASoC: fsl_easrc: Add EASRC ASoC CPU DAI
drivers" from Apr 16, 2020, leads to the following Smatch complaint:
sound/soc/fsl/fsl_easrc.c:1529 fsl_easrc_hw_free()
warn: variable dereferenced before check 'ctx' (see line 1527)
sound/soc/fsl/fsl_easrc.c
1526 struct fsl_asrc_pair *ctx = runtime->private_data;
1527 struct fsl_easrc_ctx_priv *ctx_priv = ctx->private;
^^^^^
Dereference
1528
1529 if (ctx && (ctx_priv->ctx_streams & BIT(substream->stream))) {
^^^
This check is too late, to prevent a NULL dereference.
1530 ctx_priv->ctx_streams &= ~BIT(substream->stream);
1531 fsl_easrc_release_context(ctx);
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-24 10:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-24 10:20 [bug report] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers Dan Carpenter
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.