Messages in this thread | | | From | Haojian Zhuang <> | Date | Tue, 19 Apr 2011 01:28:23 -0700 | Subject | RE: [PATCH 13/14] regulator: check name in initialization of max8925 |
| |
>-----Original Message----- >From: Mark Brown [mailto:broonie@opensource.wolfsonmicro.com] >Sent: 2011年4月19日 4:09 PM >To: Haojian Zhuang >Cc: Haojian Zhuang; sameo@linux.intel.com; linux-kernel@vger.kernel.org; >dmitry.torokhov@gmail.com; a.zummo@towertech.it; johnpol@2ka.mipt.ru; >cbou@mail.ru; dwmw2@infradead.org; lrg@slimlogic.co.uk >Subject: Re: [PATCH 13/14] regulator: check name in initialization of >max8925 > >On Mon, Apr 18, 2011 at 07:42:09PM -0700, Haojian Zhuang wrote: >> Machine driver: >> Platform data: >> .regulator[0] = xxx >> .regulator[1] = xxx > >> The index of regulator array is id of buck and ldo. >> 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.
| |