diff options
Diffstat (limited to 'drivers/media/i2c/uda1342.c')
-rw-r--r-- | drivers/media/i2c/uda1342.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/i2c/uda1342.c b/drivers/media/i2c/uda1342.c index 3af4085..081786d 100644 --- a/drivers/media/i2c/uda1342.c +++ b/drivers/media/i2c/uda1342.c @@ -69,7 +69,7 @@ static int uda1342_probe(struct i2c_client *client, dev_dbg(&client->dev, "initializing UDA1342 at address %d on %s\n", client->addr, adapter->name); - sd = kzalloc(sizeof(struct v4l2_subdev), GFP_KERNEL); + sd = devm_kzalloc(&client->dev, sizeof(*sd), GFP_KERNEL); if (sd == NULL) return -ENOMEM; @@ -89,7 +89,6 @@ static int uda1342_remove(struct i2c_client *client) struct v4l2_subdev *sd = i2c_get_clientdata(client); v4l2_device_unregister_subdev(sd); - kfree(sd); return 0; } |