[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANk1AXRag72MOf1c4_BBAXG38UKHxfs+hjsAu67xa-aU8JNqGw@mail.gmail.com>
Date: Sat, 23 Aug 2014 19:48:43 -0500
From: Alan Tull <delicious.quinoa@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: Guenter Roeck <linux@...ck-us.net>,
atull <atull@...nsource.altera.com>, jdelvare@...e.de,
lm-sensors@...sensors.org, lgirdwood@...il.com,
linux-kernel <linux-kernel@...r.kernel.org>,
dinguyen@...nsource.altera.com, yvanderv@...nsource.altera.com
Subject: Re: [PATCH v2 1/2] pmbus: add regulator support
On Sat, Aug 23, 2014 at 9:54 AM, Mark Brown <broonie@...nel.org> wrote:
> On Sat, Aug 23, 2014 at 07:00:44AM -0700, Guenter Roeck wrote:
>> On 08/22/2014 05:31 PM, atull wrote:
>
>> >of_get_regulator_init_data() will only have an error if it cannot alloc
>> >the regulator_init_data struct. That's why I did -ENOMEM. If there
>> >is no platform data and nothing about the regulator in the device tree, we
>> >should end up with a zeroed out regulator_init_data.
>
>> Yes, but if OF is not defined it will return NULL as well. Unless I am
>> missing something, that means that the code will now fail if there is
>> no platform init data and OF is not configured.
>
> Indeed, and that's the more interesting case than running out of memory.
Thanks for catching this. I'll remove the unnecessary check for NULL
and the brackets here.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists