From: Colin Ian King <colin.king@canonical.com>
To: Steve Twiss <stwiss.opensource@diasemi.com>,
Support Opensource <Support.Opensource@diasemi.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regulator: da9055: remove null pointer check on array pdata->regulators
Date: Mon, 12 Sep 2016 21:44:15 +0100 [thread overview]
Message-ID: <288cd660-b52d-7781-c0eb-87ce1d1b461e@canonical.com> (raw)
In-Reply-To: <6ED8E3B22081A4459DAC7699F3695FB7018CCD949A@SW-EX-MBX02.diasemi.com>
On 12/09/16 17:09, Steve Twiss wrote:
>
>
>
> On 08 September 2016 10:47, Colin King wrote:
>
>> To: Support Opensource; Liam Girdwood; Mark Brown
>> Cc: linux-kernel@vger.kernel.org
>> Subject: [PATCH] regulator: da9055: remove null pointer check on array pdata->regulators
>>
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> pdata->regulators is an array of DA9052_MAX_REGULATORS struct
>> regulator_init_data pointers hence cannot be null, so the null pointer
>> check on pdata->regulators is redundant. Remove it.
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>> drivers/regulator/da9055-regulator.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-
>> regulator.c
>> index d029c94..a118f63 100644
>> --- a/drivers/regulator/da9055-regulator.c
>> +++ b/drivers/regulator/da9055-regulator.c
>> @@ -612,7 +612,7 @@ static int da9055_regulator_probe(struct
>> platform_device *pdev)
>> config.driver_data = regulator;
>> config.regmap = da9055->regmap;
>>
>> - if (pdata && pdata->regulators) {
>> + if (pdata) {
>> config.init_data = pdata->regulators[pdev->id];
>> } else {
>> ret = da9055_regulator_dt_init(pdev, regulator, &config,
>> --
>> 2.9.3
>
> Yes, it's true.
>
> One my colleagues just pointed out why they had déjà vu.
>
> May I refer to the answer that was given back in March,
> https://patchwork.kernel.org/patch/8679771/
>
> Regards,
> Steve
>
>
Apologies for the noise. I lost track of my original patch.
prev parent reply other threads:[~2016-09-12 20:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-08 9:46 Colin King
2016-09-12 16:09 ` Steve Twiss
2016-09-12 20:44 ` Colin Ian King [this message]
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=288cd660-b52d-7781-c0eb-87ce1d1b461e@canonical.com \
--to=colin.king@canonical.com \
--cc=Support.Opensource@diasemi.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stwiss.opensource@diasemi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®