mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: platform: vxd: Kconfig: fix noderef.cocci warnings
@ 2021-11-20  9:45 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2021-11-20  9:45 UTC (permalink / raw)
  To: Sidraya, Praneeth Bajjuri, Angela Stegmaier; +Cc: linux-kernel, kbuild-all

From: kernel test robot <lkp@intel.com>

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

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

CC: Sidraya <sidraya.bj@pathpartnertech.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

tree:   git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head:   0c67d996db8f3c9149598bc98657ae28fee22208
commit: 97dfdd999ba7266785579c99c40a3c65e63e864a [10173/10206] media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile
:::::: branch date: 2 days ago
:::::: commit date: 9 days ago

 work_queue.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/media/platform/vxe-vxd/common/work_queue.c
+++ b/drivers/media/platform/vxe-vxd/common/work_queue.c
@@ -39,7 +39,7 @@ void init_work(void **work_args, void *w
 	//create a link
 	struct node *link = kmalloc(sizeof(*link), GFP_KERNEL);

-	*work = kzalloc(sizeof(*work), GFP_KERNEL);
+	*work = kzalloc(sizeof(**work), GFP_KERNEL);
 	if (!(*work)) {
 		pr_err("Memory allocation failed for work_queue\n");
 		return;
@@ -62,7 +62,7 @@ void init_delayed_work(void **work_args,
 	//create a link
 	struct node *link = kmalloc(sizeof(*link), GFP_KERNEL);

-	*work = kzalloc(sizeof(*work), GFP_KERNEL);
+	*work = kzalloc(sizeof(**work), GFP_KERNEL);
 	if (!(*work)) {
 		pr_err("Memory allocation failed for delayed_work_queue\n");
 		return;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-20  9:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-20  9:45 [PATCH] media: platform: vxd: Kconfig: fix noderef.cocci warnings Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®