mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 06:43:09 +00:00
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: 24d756e914
("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>
This commit is contained in:
parent
e2e73ed46c
commit
ab75641ffd
@ -2367,7 +2367,7 @@ static int mt9m114_probe(struct i2c_client *client)
|
|||||||
|
|
||||||
ret = mt9m114_clk_init(sensor);
|
ret = mt9m114_clk_init(sensor);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto error_ep_free;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Identify the sensor. The driver supports runtime PM, but needs to
|
* 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);
|
ret = mt9m114_power_on(sensor);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err_probe(dev, ret, "Could not power on the device\n");
|
dev_err_probe(dev, ret, "Could not power on the device\n");
|
||||||
return ret;
|
goto error_ep_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = mt9m114_identify(sensor);
|
ret = mt9m114_identify(sensor);
|
||||||
|
Loading…
Reference in New Issue
Block a user