media: i2c: ov50c40: fix the warning when sensor init failed

resolve the warning log below:
[    3.789764][    T1] ------------[ cut here ]------------
[    3.790250][    T1] WARNING: CPU: 2 PID: 1 at
drivers/regulator/core.c:2157 _regulator_put.part.22+0x168/0x170
[    3.791131][    T1] Modules linked in:
[    3.791474][    T1] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.10.66
[    3.792077][    T1] Hardware name: Rockchip RK3588S TABLET V10 Board
(DT)
[    3.792683][    T1] pstate: 80c00009 (Nzcv daif +PAN +UAO -TCO
BTYPE=--)
[    3.793277][    T1] pc : _regulator_put.part.22+0x168/0x170
[    3.793771][    T1] lr : regulator_put+0x34/0x50
[    3.794184][    T1] sp : ffffffc01249baa0
[    3.794540][    T1] pmr_save: 000000e0
[    3.794874][    T1] x29: ffffffc01249baa0 x28: ffffff8402cc2720
[    3.795417][    T1] x27: ffffff8402cc2720 x26: ffffffc01083be18
[    3.795958][    T1] x25: ffffffc01083be10 x24: 0000000000000008
[    3.796500][    T1] x23: ffffff8402cc2420 x22: ffffffc01249bba8
[    3.797042][    T1] x21: 0000000000000000 x20: ffffff84037a3c00
[    3.797583][    T1] x19: ffffff84037a3c00 x18: ffffffc0110eb8c4
[    3.798125][    T1] x17: 00000000000010f4 x16: ffffffc0110eb898
[    3.798667][    T1] x15: 000000000000034d x14: 0000000000000000
[    3.799208][    T1] x13: 0000000000000000 x12: 0000000000000ac1
[    3.799749][    T1] x11: 0000000000000001 x10: 0000000000000e20
[    3.800291][    T1] x9 : ffffffc01249ba20 x8 : ffffff8400320e80
[    3.800832][    T1] x7 : 0000000000000001 x6 : 00000000022385a4
[    3.801373][    T1] x5 : 0000000000000001 x4 : 0000000000000000
[    3.801914][    T1] x3 : ffffffc01221cb58 x2 : ffffff8400320000
[    3.802455][    T1] x1 : 0000000000000000 x0 : 0000000000000001

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I161b5a57b7e73ed7a57c800ae5a87e9acb7b86c6
This commit is contained in:
Wang Panzhenzhuan
2021-12-28 12:45:37 +00:00
committed by Tao Huang
parent 82e307e6d2
commit b1136bfb97

View File

@@ -6655,8 +6655,8 @@ static void __ov50c40_power_off(struct ov50c40 *ov50c40)
if (ov50c40->is_thunderboot_ng) {
ov50c40->is_thunderboot_ng = false;
regulator_bulk_disable(OV50C40_NUM_SUPPLIES, ov50c40->supplies);
}
regulator_bulk_disable(OV50C40_NUM_SUPPLIES, ov50c40->supplies);
}
static int ov50c40_runtime_resume(struct device *dev)