lkml.org 
[lkml]   [2013]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] extcon: Change field type of 'dev' in extcon_dev structure
On Mon, Sep 02, 2013 at 09:20:07AM +0900, Chanwoo Choi wrote:
> - edev->dev = kzalloc(sizeof(struct device), GFP_KERNEL);
> - if (!edev->dev)
> - return -ENOMEM;
> - edev->dev->parent = dev;
> - edev->dev->class = extcon_class;
> - edev->dev->release = extcon_dev_release;
> + edev->dev.parent = dev;
> + edev->dev.class = extcon_class;
> + edev->dev.release = extcon_dev_release;

You didn't change extcon_dev_release() to properly free all of the
memory you allocated here, otherwise the slab allocator will oops when
you try to call it...

thanks,

greg k-h


\
 
 \ /
  Last update: 2013-09-02 03:01    [W:0.198 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site