diff options
Diffstat (limited to 'drivers/media/i2c/bt866.c')
-rw-r--r-- | drivers/media/i2c/bt866.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/i2c/bt866.c b/drivers/media/i2c/bt866.c index 905320b67a1c..9355b924b471 100644 --- a/drivers/media/i2c/bt866.c +++ b/drivers/media/i2c/bt866.c @@ -207,7 +207,7 @@ static int bt866_probe(struct i2c_client *client, v4l_info(client, "chip found @ 0x%x (%s)\n", client->addr << 1, client->adapter->name); - encoder = kzalloc(sizeof(*encoder), GFP_KERNEL); + encoder = devm_kzalloc(&client->dev, sizeof(*encoder), GFP_KERNEL); if (encoder == NULL) return -ENOMEM; sd = &encoder->sd; @@ -220,7 +220,6 @@ static int bt866_remove(struct i2c_client *client) struct v4l2_subdev *sd = i2c_get_clientdata(client); v4l2_device_unregister_subdev(sd); - kfree(to_bt866(sd)); return 0; } |