media: platform: allgro-dvt: unregister v4l2_device on the error path
[ Upstream commit c2b96a68 ] In allegro_probe(), the v4l2 device is not unregistered in the error path, which results in a memory leak. Fix it by calling v4l2_device_unregister() before returning error. Fixes: d74d4e23 ("media: allegro: move driver out of staging") Signed-off-by:Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Reviewed-by:
Michael Tretter <m.tretter@pengutronix.de> Signed-off-by:
Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading