Reset_control_assert/reset_control_deassert will not check whether
the incoming pointer is NULL, so we need to check it before using it.
Change-Id: Ib2aeeefcb2d5d7429031bc21bf7e3df1d897a6c9
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
int ret;
if (enable) {
- /* EDP 24m clock domain software reset request. */
- reset_control_assert(dp->rst_24m);
- usleep_range(20, 40);
- reset_control_deassert(dp->rst_24m);
- usleep_range(20, 40);
+ if (dp->rst_24m) {
+ /* EDP 24m clock domain software reset request. */
+ reset_control_assert(dp->rst_24m);
+ usleep_range(20, 40);
+ reset_control_deassert(dp->rst_24m);
+ usleep_range(20, 40);
+ }
ret = regmap_write(dp->grf, drv_data->grf_reg_offset,
drv_data->siddq_on);