OSDN Git Service

power: supply: ltc2941-battery-gauge: fix use-after-free
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / drivers / power / ltc2941-battery-gauge.c
index 4adf2ba..043de9d 100644 (file)
@@ -364,7 +364,7 @@ static int ltc294x_i2c_remove(struct i2c_client *client)
 {
        struct ltc294x_info *info = i2c_get_clientdata(client);
 
-       cancel_delayed_work(&info->work);
+       cancel_delayed_work_sync(&info->work);
        power_supply_unregister(info->supply);
        return 0;
 }