mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
ASoC: SOF: imx: remove error checks on NULL ipc
imx_dsp_get_data() can return NULL, but the value is not checked before being usd, leading to static analysis warnings. sound/soc/sof/imx/imx8.c:85:32: error: dereference of NULL ‘0’ [CWE-476] [-Werror=analyzer-null-dereference] 85 | spin_lock_irqsave(&priv->sdev->ipc_lock, flags); | ~~~~^~~~~~ It appears this is not really a possible problem, so remove those checks. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Yaochun Hung <yc.hung@mediatek.com> Link: https://lore.kernel.org/r/20230731213748.440285-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
55cb3dc271
commit
e302f8d9f7
1 changed files with 0 additions and 6 deletions
|
@ -37,17 +37,11 @@ struct imx_dsp_ipc {
|
|||
|
||||
static inline void imx_dsp_set_data(struct imx_dsp_ipc *ipc, void *data)
|
||||
{
|
||||
if (!ipc)
|
||||
return;
|
||||
|
||||
ipc->private_data = data;
|
||||
}
|
||||
|
||||
static inline void *imx_dsp_get_data(struct imx_dsp_ipc *ipc)
|
||||
{
|
||||
if (!ipc)
|
||||
return NULL;
|
||||
|
||||
return ipc->private_data;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue