public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: Devendra Naga <devendra.aaru@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/w1: free the w1_master at w1_free_dev and return a correct return value
Date: Wed, 20 Jun 2012 12:06:52 +0400	[thread overview]
Message-ID: <20120620080652.GA15937@ioremap.net> (raw)
In-Reply-To: <1339949879-26085-1-git-send-email-devendra.aaru@gmail.com>

Hi

On Sun, Jun 17, 2012 at 09:47:59PM +0530, Devendra Naga (devendra.aaru@gmail.com) wrote:
> the w1_master pointer is allced at the w1_alloc_master and is not freed when called with
> w1_remove_master.
> 
> when w1_alloc_dev fails the return should be -ENODEV as it does
> device_register, and that is the last case where that function
> will fail.
> 
> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>

Hmm, looks correct, but I wonder how whatever_free() function happend
not to free its arguments.

Looks like device_unregister() calls release callback, but we do not
provide one.

Greg, please pull it into your tree. Thank you.
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>

-- 
	Evgeniy Polyakov

  reply	other threads:[~2012-06-20  8:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-17 16:17 [PATCH] drivers/w1: free the w1_master at w1_free_dev and return a correct return value Devendra Naga
2012-06-20  8:06 ` Evgeniy Polyakov [this message]
2012-06-20 12:57   ` devendra.aaru
2012-06-20 23:55 ` Greg Kroah-Hartman
2012-06-21  4:44   ` devendra.aaru
2012-06-21 14:39     ` Greg Kroah-Hartman
2012-06-23 18:26       ` devendra.aaru
2012-06-21  7:48   ` Evgeniy Polyakov

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=20120620080652.GA15937@ioremap.net \
    --to=zbr@ioremap.net \
    --cc=devendra.aaru@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox