X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=drivers%2Fmedia%2Fi2c%2Fadv7175.c;h=eaefa50b8d2896c0f9fedd2d30c6a3a62597d9f7;hb=c02b211df6fc54e51ee554c27a6736a11255a764;hp=c7640fab5730d8dadcab775129ac894dd370e6fe;hpb=95b5fa1a3c0e034dc47186e033cf4a4f7fe46214;p=linux-2.6-block.git diff --git a/drivers/media/i2c/adv7175.c b/drivers/media/i2c/adv7175.c index c7640fab5730..eaefa50b8d28 100644 --- a/drivers/media/i2c/adv7175.c +++ b/drivers/media/i2c/adv7175.c @@ -409,7 +409,7 @@ static int adv7175_probe(struct i2c_client *client, v4l_info(client, "chip found @ 0x%x (%s)\n", client->addr << 1, client->adapter->name); - encoder = kzalloc(sizeof(struct adv7175), GFP_KERNEL); + encoder = devm_kzalloc(&client->dev, sizeof(*encoder), GFP_KERNEL); if (encoder == NULL) return -ENOMEM; sd = &encoder->sd; @@ -434,7 +434,6 @@ static int adv7175_remove(struct i2c_client *client) struct v4l2_subdev *sd = i2c_get_clientdata(client); v4l2_device_unregister_subdev(sd); - kfree(to_adv7175(sd)); return 0; }