From: Tsuchiya Yuto Date: Sun, 17 Oct 2021 16:19:41 +0000 (+0900) Subject: media: atomisp: add missing media_device_cleanup() in atomisp_unregister_entities() X-Git-Tag: v5.17-rc1~171^2~377 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce3015b7212e96db426d0c36f80fd159c91155d1;p=thirdparty%2Fkernel%2Flinux.git media: atomisp: add missing media_device_cleanup() in atomisp_unregister_entities() After the commit 9832e155f1ed ("[media] media-device: split media initialization and registration"), calling media_device_cleanup() is needed it seems. However, currently it is missing for the module unload path. Note that for the probe failure path, it is already added in atomisp_register_entities(). This patch adds the missing call of media_device_cleanup() in atomisp_unregister_entities(). Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Tsuchiya Yuto Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c index 1e324f1f656e5..0511c454e769d 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c @@ -1182,6 +1182,7 @@ static void atomisp_unregister_entities(struct atomisp_device *isp) v4l2_device_unregister(&isp->v4l2_dev); media_device_unregister(&isp->media_dev); + media_device_cleanup(&isp->media_dev); } static int atomisp_register_entities(struct atomisp_device *isp)