Skip to content

Commit ab75641

Browse files
pinchartlHans Verkuil
authored andcommitted
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: 24d756e ("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>
1 parent e2e73ed commit ab75641

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/media/i2c/mt9m114.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2367,7 +2367,7 @@ static int mt9m114_probe(struct i2c_client *client)
23672367

23682368
ret = mt9m114_clk_init(sensor);
23692369
if (ret)
2370-
return ret;
2370+
goto error_ep_free;
23712371

23722372
/*
23732373
* Identify the sensor. The driver supports runtime PM, but needs to
@@ -2378,7 +2378,7 @@ static int mt9m114_probe(struct i2c_client *client)
23782378
ret = mt9m114_power_on(sensor);
23792379
if (ret < 0) {
23802380
dev_err_probe(dev, ret, "Could not power on the device\n");
2381-
return ret;
2381+
goto error_ep_free;
23822382
}
23832383

23842384
ret = mt9m114_identify(sensor);

0 commit comments

Comments
 (0)