diff mbox

ASoC: Intel: Skylake: fix noderef.cocci warnings

Message ID 20160802010713.GA28226@lkp-ne04 (mailing list archive)
State Accepted
Commit 004d94e5ab01a175523c8e7d205f94fb44274986
Headers show

Commit Message

Fengguang Wu Aug. 2, 2016, 1:07 a.m. UTC
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

CC: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 skl-topology.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vinod Koul Aug. 2, 2016, 3:40 a.m. UTC | #1
On Tue, Aug 02, 2016 at 09:07:13AM +0800, kbuild test robot wrote:
> 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

Acked-by: Vinod Koul <vinod.koul@intel.com>
diff mbox

Patch

--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -477,7 +477,7 @@  skl_tplg_init_pipe_modules(struct skl *s
 		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;