Commit cdabfa84 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: vimc: fix memory leak

media_device_cleanup() wasn't called, which caused a small
memory leak.
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 959bba13
...@@ -220,6 +220,7 @@ static int vimc_comp_bind(struct device *master) ...@@ -220,6 +220,7 @@ static int vimc_comp_bind(struct device *master)
err_mdev_unregister: err_mdev_unregister:
media_device_unregister(&vimc->mdev); media_device_unregister(&vimc->mdev);
media_device_cleanup(&vimc->mdev);
err_comp_unbind_all: err_comp_unbind_all:
component_unbind_all(master, NULL); component_unbind_all(master, NULL);
err_v4l2_unregister: err_v4l2_unregister:
...@@ -236,6 +237,7 @@ static void vimc_comp_unbind(struct device *master) ...@@ -236,6 +237,7 @@ static void vimc_comp_unbind(struct device *master)
dev_dbg(master, "unbind"); dev_dbg(master, "unbind");
media_device_unregister(&vimc->mdev); media_device_unregister(&vimc->mdev);
media_device_cleanup(&vimc->mdev);
component_unbind_all(master, NULL); component_unbind_all(master, NULL);
v4l2_device_unregister(&vimc->v4l2_dev); v4l2_device_unregister(&vimc->v4l2_dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment