summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-10-03 22:20:43 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-10-12 09:22:29 +0200
commitab75641ffd3a6a69ad5552a4cba2a20ff67e0904 (patch)
treec1de52fd8382096e2a9c471bdf18f0ed13c9c5aa /drivers/media/i2c
parente2e73ed46c395777868b36c879c6cd213b45f123 (diff)
downloadlinux-stable-ab75641ffd3a6a69ad5552a4cba2a20ff67e0904.tar.gz
linux-stable-ab75641ffd3a6a69ad5552a4cba2a20ff67e0904.tar.bz2
linux-stable-ab75641ffd3a6a69ad5552a4cba2a20ff67e0904.zip
media: i2c: mt9m114: Fix missing error unwind in probe()
Two paths in the probe function return directly instead of jumping to error handling. Fix them. Fixes: 24d756e914fc ("media: i2c: Add driver for onsemi MT9M114 camera sensor") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/mt9m114.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/i2c/mt9m114.c b/drivers/media/i2c/mt9m114.c
index dae675e52390..ac19078ceda3 100644
--- a/drivers/media/i2c/mt9m114.c
+++ b/drivers/media/i2c/mt9m114.c
@@ -2367,7 +2367,7 @@ static int mt9m114_probe(struct i2c_client *client)
ret = mt9m114_clk_init(sensor);
if (ret)
- return ret;
+ goto error_ep_free;
/*
* Identify the sensor. The driver supports runtime PM, but needs to
@@ -2378,7 +2378,7 @@ static int mt9m114_probe(struct i2c_client *client)
ret = mt9m114_power_on(sensor);
if (ret < 0) {
dev_err_probe(dev, ret, "Could not power on the device\n");
- return ret;
+ goto error_ep_free;
}
ret = mt9m114_identify(sensor);