media: imx214: Fix the error handling in imx214_probe()
authorZheyu Ma <zheyuma97@gmail.com>
Tue, 10 May 2022 11:48:52 +0000 (12:48 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 29 Apr 2024 11:06:33 +0000 (12:06 +0100)
The driver should disable regulators when fails to probe.

Link: https://lore.kernel.org/linux-media/20220510114852.1719018-1-zheyuma97@gmail.com
Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/imx214.c

index 10b6ad66d12616a56bdc8e525a7c7994a209bc05..4962cfe7c83d62425aeccb46a400fa93146f14ea 100644 (file)
@@ -1114,6 +1114,7 @@ free_ctrl:
        v4l2_ctrl_handler_free(&imx214->ctrls);
 error_power_off:
        pm_runtime_disable(imx214->dev);
+       regulator_bulk_disable(IMX214_NUM_SUPPLIES, imx214->supplies);
 
        return ret;
 }