diff options
Diffstat (limited to 'drivers/media/platform/vimc/vimc-scaler.c')
-rw-r--r-- | drivers/media/platform/vimc/vimc-scaler.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/media/platform/vimc/vimc-scaler.c b/drivers/media/platform/vimc/vimc-scaler.c index 39b2a73dfcc1..2028afa4ef7a 100644 --- a/drivers/media/platform/vimc/vimc-scaler.c +++ b/drivers/media/platform/vimc/vimc-scaler.c | |||
@@ -348,6 +348,18 @@ static void *vimc_sca_process_frame(struct vimc_ent_device *ved, | |||
348 | return vsca->src_frame; | 348 | return vsca->src_frame; |
349 | }; | 349 | }; |
350 | 350 | ||
351 | static void vimc_sca_release(struct v4l2_subdev *sd) | ||
352 | { | ||
353 | struct vimc_sca_device *vsca = | ||
354 | container_of(sd, struct vimc_sca_device, sd); | ||
355 | |||
356 | kfree(vsca); | ||
357 | } | ||
358 | |||
359 | static const struct v4l2_subdev_internal_ops vimc_sca_int_ops = { | ||
360 | .release = vimc_sca_release, | ||
361 | }; | ||
362 | |||
351 | static void vimc_sca_comp_unbind(struct device *comp, struct device *master, | 363 | static void vimc_sca_comp_unbind(struct device *comp, struct device *master, |
352 | void *master_data) | 364 | void *master_data) |
353 | { | 365 | { |
@@ -356,7 +368,6 @@ static void vimc_sca_comp_unbind(struct device *comp, struct device *master, | |||
356 | ved); | 368 | ved); |
357 | 369 | ||
358 | vimc_ent_sd_unregister(ved, &vsca->sd); | 370 | vimc_ent_sd_unregister(ved, &vsca->sd); |
359 | kfree(vsca); | ||
360 | } | 371 | } |
361 | 372 | ||
362 | 373 | ||
@@ -379,7 +390,7 @@ static int vimc_sca_comp_bind(struct device *comp, struct device *master, | |||
379 | MEDIA_ENT_F_PROC_VIDEO_SCALER, 2, | 390 | MEDIA_ENT_F_PROC_VIDEO_SCALER, 2, |
380 | (const unsigned long[2]) {MEDIA_PAD_FL_SINK, | 391 | (const unsigned long[2]) {MEDIA_PAD_FL_SINK, |
381 | MEDIA_PAD_FL_SOURCE}, | 392 | MEDIA_PAD_FL_SOURCE}, |
382 | &vimc_sca_ops); | 393 | &vimc_sca_int_ops, &vimc_sca_ops); |
383 | if (ret) { | 394 | if (ret) { |
384 | kfree(vsca); | 395 | kfree(vsca); |
385 | return ret; | 396 | return ret; |