On Thu, 04 Jun 2009 17:55:36 +0900 Minkyu Kang <mk7.kang@xxxxxxxxxxx> wrote: > + INIT_DELAYED_WORK_DEFERRABLE(&chip->work, max17040_work); > + schedule_delayed_work(&chip->work, MAX17040_DELAY); > + > + bat_ps.properties = max17040_battery_props; > + bat_ps.num_properties = ARRAY_SIZE(max17040_battery_props); > + > + ret = power_supply_register(&client->dev, &bat_ps); > + if (ret) { > + dev_err(&max17040->client->dev, > + "failed: power supply register\n"); > + cancel_delayed_work(&chip->work); > + i2c_set_clientdata(client, NULL); > + kfree(chip); > + max17040 = NULL; > + return -1; > + } > + > + return 0; > +} Wouldn't it be better to start the delayed_work after the power_supply_register() has succeeded? _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm