Message ID | B85A65D85D7EB246BE421B3FB0FBB59301D88D7CE4@dbde02.ent.ti.com (mailing list archive) |
---|---|
State | Awaiting Upstream, archived |
Headers | show |
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c index 07e40dc..e050a5e 100644 --- a/drivers/mfd/twl4030-power.c +++ b/drivers/mfd/twl4030-power.c @@ -352,11 +352,9 @@ void __init twl4030_power_init(struct twl4030_power_data *triton2_scripts) } resconfig = triton2_scripts->resource_config; - if (resconfig) { - while (resconfig->resource) { - twl4030_configure_resource(resconfig); - resconfig++; - } + while (resconfig && resconfig->resource) { + twl4030_configure_resource(resconfig); + resconfig++; } if (twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, 0, R_PROTECT_KEY))