From c26996343558c451e03802e5576c0029018dc8f0 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sat, 21 May 2022 15:09:17 +0200 Subject: [PATCH 334/464] media: i2c: imx258: Powerdown the sensor if clock enable fails This was missing. Signed-off-by: Ondrej Jirman --- drivers/media/i2c/imx258.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c index 31057ab945de..b468e75306aa 100644 --- a/drivers/media/i2c/imx258.c +++ b/drivers/media/i2c/imx258.c @@ -1041,6 +1041,7 @@ static int imx258_power_on(struct device *dev) ret = clk_prepare_enable(imx258->clk); if (ret) { dev_err(dev, "failed to enable clock\n"); + gpiod_set_value_cansleep(imx258->pwdn_gpio, 1); regulator_bulk_disable(IMX258_SUPPLY_COUNT, imx258->supplies); return ret; } -- 2.34.1