Messages in this thread | | | Date | Sun, 1 Sep 2013 17:38:07 -0700 | From | Greg KH <> | Subject | Re: [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
| |