All of lore.kernel.org
 help / color / mirror / Atom feed
* HTC Dream camera, not need sizeof
@ 2009-12-17  2:13 Pavel Vasilyev
  0 siblings, 0 replies; only message in thread
From: Pavel Vasilyev @ 2009-12-17  2:13 UTC (permalink / raw)
  To: linux-kernel

        http://bugzilla.kernel.org/show_bug.cgi?id=14825


  On line 258,  sizeof(extlen), always will be sizeof( unit32_t) or 4  

  It seems that something is wrong?!?!  :)


Original 

 255    extlen = sizeof(struct vfe_frame_extra);
 256
 257        extdata =
 258                kmalloc(sizeof(extlen), GFP_ATOMIC);

is equal         kmalloc(sizeof(uint32_t), GFP_ATOMIC);
But then do not need to calculate the size of the structure - 
sizeof(vfe_frame_extra) ???

 259        if (!extdata) {
 260                rc = -ENOMEM;
 261                goto init_fail;

---------------------
May be next?


diff --git a/drivers/staging/dream/camera/msm_vfe7x.c 
b/drivers/staging/dream/camera/msm_vfe7x.c
index 33ab3ac..4d39848 100644
--- a/drivers/staging/dream/camera/msm_vfe7x.c
+++ b/drivers/staging/dream/camera/msm_vfe7x.c
@@ -256,7 +256,7 @@ static int vfe_7x_init(struct msm_vfe_callback *presp,
        extlen = sizeof(struct vfe_frame_extra);

        extdata =
-               kmalloc(sizeof(extlen), GFP_ATOMIC);
+               kmalloc(extlen, GFP_ATOMIC);
        if (!extdata) {
                rc = -ENOMEM;
                goto init_fail;

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

only message in thread, other threads:[~2009-12-17  2:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-17  2:13 HTC Dream camera, not need sizeof Pavel Vasilyev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.