Bug 14825 (no_sizeof)

Summary: HTC Dream camera, not need sizeof
Product: Drivers Reporter: Pavel Vasilyev (dixlor)
Component: StagingAssignee: drivers_staging (drivers_staging)
Status: CLOSED OBSOLETE    
Severity: normal CC: alan
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.32-git12 Subsystem:
Regression: No Bisected commit-id:
Attachments: PATCH

Description Pavel Vasilyev 2009-12-17 02:12:37 UTC
Created attachment 24213 [details]
PATCH

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;
Comment 1 Greg Kroah-Hartman 2009-12-18 05:54:04 UTC
On Thu, Dec 17, 2009 at 02:12:49AM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> Created an attachment (id=24213)
>  --> (http://bugzilla.kernel.org/attachment.cgi?id=24213)
> PATCH
> 
> On line 258,  sizeof(extlen), always will be sizeof( unit32_t) or 4  
> It seems that something is wrong?!?!  :)

Can you please submit a patch through email as per the
Documentation/SubmittingPatches instructions?