@@ -196,6 +196,7 @@ static int cs5345_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
v4l2_device_unregister_subdev(sd);
+ i2c_set_clientdata(client, NULL);
kfree(sd);
return 0;
}
@@ -199,6 +199,7 @@ static int cs53l32a_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
v4l2_device_unregister_subdev(sd);
+ i2c_set_clientdata(client, NULL);
kfree(sd);
return 0;
}
@@ -461,6 +461,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
return 0;
err_out_free:
+ i2c_set_clientdata(client, NULL);
kfree(ir);
return err;
}
@@ -476,6 +477,7 @@ static int ir_remove(struct i2c_client *client)
ir_input_unregister(ir->input);
/* free memory */
+ i2c_set_clientdata(client, NULL);
kfree(ir);
return 0;
}
@@ -188,6 +188,7 @@ static int tda9840_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
v4l2_device_unregister_subdev(sd);
+ i2c_set_clientdata(client, NULL);
kfree(sd);
return 0;
}
@@ -164,6 +164,7 @@ static int tea6415c_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
v4l2_device_unregister_subdev(sd);
+ i2c_set_clientdata(client, NULL);
kfree(sd);
return 0;
}
@@ -146,6 +146,7 @@ static int tea6420_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
v4l2_device_unregister_subdev(sd);
+ i2c_set_clientdata(client, NULL);
kfree(sd);
return 0;
}
@@ -114,6 +114,7 @@ static int ths7303_remove(struct i2c_client *client)
struct v4l2_subdev *sd = i2c_get_clientdata(client);
v4l2_device_unregister_subdev(sd);
+ i2c_set_clientdata(client, NULL);
kfree(sd);
return 0;