lkml.org 
[lkml]   [2013]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] regulator: tps65910: Fix using wrong dev argument for calling of_regulator_match
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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-01-29 05:41    [W:0.067 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site