All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: linux-kernel@vger.kernel.org, myungjoo.ham@samsung.com,
	kyungmin.park@samsung.com
Subject: Re: [PATCH 2/3] extcon: Change field type of 'dev' in extcon_dev structure
Date: Sun, 1 Sep 2013 17:38:07 -0700	[thread overview]
Message-ID: <20130902003807.GA10709@kroah.com> (raw)
In-Reply-To: <1378081208-20274-3-git-send-email-cw00.choi@samsung.com>

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

  reply	other threads:[~2013-09-02  0:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-02  0:20 [PATCH 0/3] extcon: Code clean to fix up coding style and remove Chanwoo Choi
2013-09-02  0:20 ` [PATCH 1/3] extcon: Fix indentation coding style to improve readability Chanwoo Choi
2013-09-02  0:20 ` [PATCH 2/3] extcon: Change field type of 'dev' in extcon_dev structure Chanwoo Choi
2013-09-02  0:38   ` Greg KH [this message]
2013-09-02  0:41     ` Chanwoo Choi
2013-09-02  0:20 ` [PATCH 3/3] extcon: Simplify extcon_dev_register() prototype by removing unnecessary parameter Chanwoo Choi
2013-09-02  0:40   ` Greg KH
2013-09-02  1:13     ` Chanwoo Choi
2013-09-03 15:57       ` Greg KH
2013-09-04  0:17         ` Chanwoo Choi
2013-09-04  1:16           ` Greg KH
2013-09-04  5:18             ` Chanwoo Choi
2013-09-08 21:51               ` Greg KH
2013-09-09  2:44                 ` Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130902003807.GA10709@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=cw00.choi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.