Commit 2453d54d authored by Joe Hattori's avatar Joe Hattori Committed by Greg Kroah-Hartman
Browse files

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: default avatarJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Reviewed-by: default avatarMichael Tretter <m.tretter@pengutronix.de>
Signed-off-by: default avatarSebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f343b442
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment