Re: [PATCH 1/3] media: vimc: initialize vim entity pointers to NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



W dniu 01.10.2019 o 19:35, Helen Koike pisze:


<snip>


I believe just the kcalloc bellow should fix the issue.
But if you want to do this cleanup anyway, I would suggest sending a separate patch for it.

@@ -199,7 +197,7 @@ static int vimc_register_devices(struct vimc_device *vimc)
       }
         /* allocate ent_devs */
-    vimc->ent_devs = kmalloc_array(vimc->pipe_cfg->num_ents,
+    vimc->ent_devs = kcalloc(vimc->pipe_cfg->num_ents,
                          sizeof(*vimc->ent_devs),
                          GFP_KERNEL);

Could you fix the alignment of the params here?

Isn't the above change (kmalloc_array() to kcalloc()) alone enough
to ensure the promise from the patch title is fulfilled?

I fully agree. That is why I mentioned above in "I believe just the kcalloc bellow should fix the issue."
Sorry if I wasn't clear.


Thanks for teaching me how to read :D

Andrzej



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux