media: soc_camera: power/power-off should be pair called in soc_camera_probe

Change-Id: I67c9fd6578be02a405897e75b6d18bcb9d33f150
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
This commit is contained in:
Zhang Yunlong
2018-05-08 11:13:12 +08:00
committed by Tao Huang
parent c948904967
commit 3842b4d628

View File

@@ -2001,14 +2001,14 @@ static int soc_camera_probe(struct soc_camera_host *ici,
if (shd->board_info) {
ret = soc_camera_i2c_init(icd, sdesc);
if (ret < 0 && ret != -EPROBE_DEFER)
goto eadd;
goto epower;
} else if (!shd->add_device || !shd->del_device) {
ret = -EINVAL;
goto eadd;
goto epower;
} else {
ret = soc_camera_clock_start(ici);
if (ret < 0)
goto eadd;
goto epower;
if (shd->module_name)
ret = request_module(shd->module_name);
@@ -2048,7 +2048,7 @@ enodrv:
eadddev:
soc_camera_clock_stop(ici);
}
epower:
soc_camera_power_off(icd->pdev, ssdd, NULL);
eadd:
if (icd->vdev) {