diff options
Diffstat (limited to 'drivers/media/i2c/tvp514x.c')
-rw-r--r-- | drivers/media/i2c/tvp514x.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c index d5e10215a28f..aa94ebc2d755 100644 --- a/drivers/media/i2c/tvp514x.c +++ b/drivers/media/i2c/tvp514x.c | |||
@@ -951,7 +951,7 @@ tvp514x_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
951 | return -ENODEV; | 951 | return -ENODEV; |
952 | } | 952 | } |
953 | 953 | ||
954 | decoder = kzalloc(sizeof(*decoder), GFP_KERNEL); | 954 | decoder = devm_kzalloc(&client->dev, sizeof(*decoder), GFP_KERNEL); |
955 | if (!decoder) | 955 | if (!decoder) |
956 | return -ENOMEM; | 956 | return -ENOMEM; |
957 | 957 | ||
@@ -998,7 +998,6 @@ tvp514x_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
998 | int err = decoder->hdl.error; | 998 | int err = decoder->hdl.error; |
999 | 999 | ||
1000 | v4l2_ctrl_handler_free(&decoder->hdl); | 1000 | v4l2_ctrl_handler_free(&decoder->hdl); |
1001 | kfree(decoder); | ||
1002 | return err; | 1001 | return err; |
1003 | } | 1002 | } |
1004 | v4l2_ctrl_handler_setup(&decoder->hdl); | 1003 | v4l2_ctrl_handler_setup(&decoder->hdl); |
@@ -1023,7 +1022,6 @@ static int tvp514x_remove(struct i2c_client *client) | |||
1023 | 1022 | ||
1024 | v4l2_device_unregister_subdev(sd); | 1023 | v4l2_device_unregister_subdev(sd); |
1025 | v4l2_ctrl_handler_free(&decoder->hdl); | 1024 | v4l2_ctrl_handler_free(&decoder->hdl); |
1026 | kfree(decoder); | ||
1027 | return 0; | 1025 | return 0; |
1028 | } | 1026 | } |
1029 | /* TVP5146 Init/Power on Sequence */ | 1027 | /* TVP5146 Init/Power on Sequence */ |