All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Axel Lin <axel.lin@ingics.com>,
	Graeme Gregory <gg@slimlogic.co.uk>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org,
	Laxman Dewangan <ldewangan@nvidia.com>,
	AnilKumar Ch <anilkumar@ti.com>
Subject: Re: [PATCH 2/2] regulator: tps65910: Fix using wrong dev argument for calling of_regulator_match
Date: Tue, 29 Jan 2013 11:39:20 +0800	[thread overview]
Message-ID: <20130129033918.GA6878@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <510711D1.3090205@wwwdotorg.org>

[-- Attachment #1: Type: text/plain, Size: 895 bytes --]

On Mon, Jan 28, 2013 at 05:03:29PM -0700, Stephen Warren wrote:
> On 01/23/2013 07:31 PM, Axel Lin wrote:
> > The dev parameter is the device requesting the data.
> > In this case it should be &pdev->dev rather than pdev->dev.parent.

> > The dev parameter is used to call devm_kzalloc in of_get_regulator_init_data(),
> > which means this fixes a memory leak because the memory is allocated every time
> > probe() is called, thus it should be freed when this driver is unloaded.

> With this patch as part of next-20130128, I see a crash when booting my
> system. Reverting this patch solves the problem.

Hrm, there's nothing obviously wrong with the code here - all we do with
dev is call devm_kzalloc().  Can you decode where the crash is actually
occurring, that might give a clue as to what's getting upset?  In the
backtrace it's in regulator_register() but that's a pretty big function.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-01-29  3:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24  2:27 [PATCH 1/2] regulator: tps65217: Fix using wrong dev argument for calling of_regulator_match Axel Lin
2013-01-24  2:31 ` [PATCH 2/2] regulator: tps65910: " Axel Lin
2013-01-24  4:45   ` Laxman Dewangan
2013-01-24 17:02     ` gg
2013-01-29  0:03   ` Stephen Warren
2013-01-29  3:39     ` Mark Brown [this message]
2013-01-29 18:46       ` Stephen Warren
2013-01-24  4:52 ` [PATCH 1/2] regulator: tps65217: " Mark Brown
     [not found]   ` <CAFRkauDdbYH2jm_TXypjhe0rWyEOpS-JqZ1G4-WZmFKFJngbkw@mail.gmail.com>
2013-01-24 10:00     ` Mark Brown
2013-01-24 11:00 ` Mark Brown

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=20130129033918.GA6878@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=anilkumar@ti.com \
    --cc=axel.lin@ingics.com \
    --cc=gg@slimlogic.co.uk \
    --cc=ldewangan@nvidia.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swarren@wwwdotorg.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 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.