ASoC: Intel: Skylake: fix noderef.cocci warnings
authorkbuild test robot <fengguang.wu@intel.com>
Tue, 2 Aug 2016 01:07:13 +0000 (09:07 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 8 Aug 2016 10:54:59 +0000 (11:54 +0100)
sound/soc/intel/skylake/skl-topology.c:480:24-30: ERROR: application of sizeof to pointer

 sizeof when applied to a pointer typed expression gives the size of
 the pointer

Generated by: scripts/coccinelle/misc/noderef.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-topology.c

index a1d9f84d967423473063386634904ee8adb73a43..1300e4b9e7d12c6b63e7f631668151e889a29d91 100644 (file)
@@ -477,7 +477,7 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe)
                if (mconfig->id.module_id < 0) {
                        struct skl_dfw_module *dfw_config;
 
-                       dfw_config = kzalloc(sizeof(dfw_config), GFP_KERNEL);
+                       dfw_config = kzalloc(sizeof(*dfw_config), GFP_KERNEL);
                        if (!dfw_config)
                                return -ENOMEM;