Re: [PATCH 13/14] regulator: check name in initialization ofmax8925

From: Mark Brown
Date: Tue Apr 19 2011 - 06:51:32 EST


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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/