diff options
| author | Pierre-Louis Bossart <[email protected]> | 2022-05-20 21:17:10 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2022-06-06 11:35:13 +0000 |
| commit | a140785b701d286374ea1b26762f333e4f5e9ee3 (patch) | |
| tree | 0c3dd649c81e3cec591a1d5d72b29128b09066b2 /sound/soc/intel/atom/sst/sst_ipc.c | |
| parent | ASoC: Intel: atom: sst_ipc: remove redundant test (diff) | |
| download | kernel-a140785b701d286374ea1b26762f333e4f5e9ee3.tar.gz kernel-a140785b701d286374ea1b26762f333e4f5e9ee3.zip | |
ASoC: Intel: atom: sst_ipc: remove useless initializations
cppcheck throws invalid NULL dereference warnings but there's indeed
no need to initialize a loop variable or initialize to NULL before
allocating memory.
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Reviewed-by: Bard Liao <[email protected]>
Reviewed-by: Péter Ujfalusi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'sound/soc/intel/atom/sst/sst_ipc.c')
| -rw-r--r-- | sound/soc/intel/atom/sst/sst_ipc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/intel/atom/sst/sst_ipc.c b/sound/soc/intel/atom/sst/sst_ipc.c index 78ea67c7a128..4e039c7173d8 100644 --- a/sound/soc/intel/atom/sst/sst_ipc.c +++ b/sound/soc/intel/atom/sst/sst_ipc.c @@ -28,7 +28,7 @@ struct sst_block *sst_create_block(struct intel_sst_drv *ctx, u32 msg_id, u32 drv_id) { - struct sst_block *msg = NULL; + struct sst_block *msg; dev_dbg(ctx->dev, "Enter\n"); msg = kzalloc(sizeof(*msg), GFP_KERNEL); @@ -63,7 +63,7 @@ struct sst_block *sst_create_block(struct intel_sst_drv *ctx, int sst_wake_up_block(struct intel_sst_drv *ctx, int result, u32 drv_id, u32 ipc, void *data, u32 size) { - struct sst_block *block = NULL; + struct sst_block *block; dev_dbg(ctx->dev, "Enter\n"); @@ -91,7 +91,7 @@ int sst_wake_up_block(struct intel_sst_drv *ctx, int result, int sst_free_block(struct intel_sst_drv *ctx, struct sst_block *freed) { - struct sst_block *block = NULL, *__block; + struct sst_block *block, *__block; dev_dbg(ctx->dev, "Enter\n"); spin_lock_bh(&ctx->block_lock); |
