From: Christophe JAILLET Date: Mon, 22 Aug 2022 09:40:43 +0000 (+0200) Subject: media: dw100: Fix an error handling path in dw100_probe() X-Git-Tag: v6.6.17~6464^2~47 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e69714e6177d963668a45499b500c1d4de7bac8;p=platform%2Fkernel%2Flinux-rpi.git media: dw100: Fix an error handling path in dw100_probe() After a successful call to media_device_init() it is safer to call media_device_cleanup(). Add the missing call in the error handling path of the probe, as already done in the remove function. [hverkuil: fixed a typo in the commit log] Fixes: bd090d4d995a ("media: dw100: Add i.MX8MP dw100 dewarper driver") Signed-off-by: Christophe JAILLET Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/nxp/dw100/dw100.c b/drivers/media/platform/nxp/dw100/dw100.c index 94518f0..b3b0577 100644 --- a/drivers/media/platform/nxp/dw100/dw100.c +++ b/drivers/media/platform/nxp/dw100/dw100.c @@ -1623,6 +1623,7 @@ error_m2m_mc: error_v4l2: video_unregister_device(vfd); err_m2m: + media_device_cleanup(&dw_dev->mdev); v4l2_m2m_release(dw_dev->m2m_dev); err_v4l2: v4l2_device_unregister(&dw_dev->v4l2_dev);