Merge "msm: camera: Fix null pointer exception in regulator disable"
This commit is contained in:
commit
d7e5337d56
1 changed files with 11 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2014, The Linux Foundataion. All rights reserved.
|
/* Copyright (c) 2011-2014, 2017, The Linux Foundataion. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 and
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -556,12 +556,16 @@ int msm_camera_enable_vreg(struct device *dev, struct camera_vreg_t *cam_vreg,
|
||||||
continue;
|
continue;
|
||||||
} else
|
} else
|
||||||
j = i;
|
j = i;
|
||||||
regulator_disable(reg_ptr[j]);
|
if (reg_ptr[j]) {
|
||||||
if (cam_vreg[j].delay > 20)
|
regulator_disable(reg_ptr[j]);
|
||||||
msleep(cam_vreg[j].delay);
|
if (cam_vreg[j].delay > 20)
|
||||||
else if (cam_vreg[j].delay)
|
msleep(cam_vreg[j].delay);
|
||||||
usleep_range(cam_vreg[j].delay * 1000,
|
else if (cam_vreg[j].delay)
|
||||||
(cam_vreg[j].delay * 1000) + 1000);
|
usleep_range(
|
||||||
|
cam_vreg[j].delay * 1000,
|
||||||
|
(cam_vreg[j].delay * 1000)
|
||||||
|
+ 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
|
|
Loading…
Add table
Reference in a new issue