RE: [PATCH 13/14] regulator: check name in initialization of max8925

From: Haojian Zhuang
Date: Tue Apr 19 2011 - 07:35:15 EST




>-----Original Message-----
>From: Mark Brown [mailto:broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx]
>Sent: 2011年4月19日 6:51 PM
>To: Haojian Zhuang
>Cc: Haojian Zhuang; sameo@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
>dmitry.torokhov@xxxxxxxxx; a.zummo@xxxxxxxxxxxx; johnpol@xxxxxxxxxxx;
>cbou@xxxxxxx; dwmw2@xxxxxxxxxxxxx; lrg@xxxxxxxxxxxxxxx
>Subject: Re: [PATCH 13/14] regulator: check name in initialization of
>max8925
>
>On Tue, Apr 19, 2011 at 01:28:23AM -0700, Haojian Zhuang wrote:
>
>> >> There's issue in max8925_core.c since we can't assume regulator[0]
>> >always declared in machine driver.
>
>> >What is the issue? It's trivial to skip the regulator if the data is
>> >null.
>
>> It skiped all regulators if regulator[0] isn't decleared.
>> (pdata == NULL) || (pdata->regulator[0] == NULL)
>
>> So it's a bug.
>
>Surely the obvious fix is to fix the issue and not skip all the
>regulators if an individual regulator has no data?

Yes.
N?叉??y??b??千v??藓{.n???{?赙zXФ?塄}?财??j:+v???赙zZ+€?zf"?????i????ア??璀??撷f?^j谦y??@A?囤?0鹅h??i