Commit 3ddac68f authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab
Browse files

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: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent b7e155e1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -994,6 +994,7 @@ static int ov2722_probe(struct i2c_client *client)
	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;