summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2022-12-03 16:48:07 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-02-08 08:24:35 +0100
commit3ddac68f667c15cd1f44a31285d44b2c1a01bfc7 (patch)
tree34ef3b1e82a767c2f92ccac3e24ffe1a49ed1f24 /drivers/staging
parentb7e155e16601b0c6f34e3345b9eca6a2efc5bc5d (diff)
media: atomisp: ov2722: Call atomisp_gmin_remove_subdev() on probe failure
Call atomisp_gmin_remove_subdev() on probe failure to properly free the GPIOs and other resources acquired by the gmin_camera_platform_data() call earlier. Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/atomisp/i2c/atomisp-ov2722.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
index d819ab5de28a..d874e12da8cc 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
@@ -994,6 +994,7 @@ out_ctrl_handler_free:
v4l2_ctrl_handler_free(&dev->ctrl_handler);
out_free:
+ atomisp_gmin_remove_subdev(&dev->sd);
v4l2_device_unregister_subdev(&dev->sd);
kfree(dev);
return ret;