On 11/25/2012 01:55 AM, Mark Brown wrote:
On Fri, Nov 23, 2012 at 10:27:12AM +0800, Qing Xu wrote:
But, in fact, it is not necessary to initialize regulator_idx.
for (i = 0; i < ARRAY_SIZE(max8925_regulator_info); i++) {
ri = &max8925_regulator_info[i];
On Fri, Nov 23, 2012 at 10:27:12AM +0800, Qing Xu wrote:
> But, in fact, it is not necessary to initialize regulator_idx.
> for (i = 0; i < ARRAY_SIZE(max8925_regulator_info); i++) {
> ri = &max8925_regulator_info[i];
> if (ri->vol_reg == res->start) {
> *
On 11/23/2012 09:41 AM, Mark Brown wrote:
On Thu, Nov 22, 2012 at 10:11:06AM +0800, Qing Xu wrote:
- int i, regulator_idx;
+ int i;
+ int regulator_idx = 0;
This sort of fix is rarely good without some analysis as to why this is
a sensible initialisation to do, just unconditi
On Thu, Nov 22, 2012 at 10:11:06AM +0800, Qing Xu wrote:
> - int i, regulator_idx;
> + int i;
> + int regulator_idx = 0;
This sort of fix is rarely good without some analysis as to why this is
a sensible initialisation to do, just unconditionally initialising may
be masking a real iss
From: Qing Xu
Fixed following compiler warning:
- drivers/regulator/max8925-regulator.c:269:51: warning:
'regulator_idx' may be used uninitialized in this function
[-Wmaybe-uninitialized]
Signed-off-by: Qing Xu
---
drivers/regulator/max8925-regulator.c |3 ++-
1 files changed, 2 inser
5 matches
Mail list logo