Skip to content

Commit 24aa8ab

Browse files
committed
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 <pierre-louis.bossart@linux.intel.com>
1 parent 9f3d8e6 commit 24aa8ab

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sound/soc/intel/atom/sst/sst_ipc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
struct sst_block *sst_create_block(struct intel_sst_drv *ctx,
2929
u32 msg_id, u32 drv_id)
3030
{
31-
struct sst_block *msg = NULL;
31+
struct sst_block *msg;
3232

3333
dev_dbg(ctx->dev, "Enter\n");
3434
msg = kzalloc(sizeof(*msg), GFP_KERNEL);
@@ -63,7 +63,7 @@ struct sst_block *sst_create_block(struct intel_sst_drv *ctx,
6363
int sst_wake_up_block(struct intel_sst_drv *ctx, int result,
6464
u32 drv_id, u32 ipc, void *data, u32 size)
6565
{
66-
struct sst_block *block = NULL;
66+
struct sst_block *block;
6767

6868
dev_dbg(ctx->dev, "Enter\n");
6969

@@ -91,7 +91,7 @@ int sst_wake_up_block(struct intel_sst_drv *ctx, int result,
9191

9292
int sst_free_block(struct intel_sst_drv *ctx, struct sst_block *freed)
9393
{
94-
struct sst_block *block = NULL, *__block;
94+
struct sst_block *block, *__block;
9595

9696
dev_dbg(ctx->dev, "Enter\n");
9797
spin_lock_bh(&ctx->block_lock);

0 commit comments

Comments
 (0)