The mipi_dsi_disp_init function takes a reference to a reset_control
during initialization and does not release it.
This becomes a problem on 4.9 because reset_control_get has been split
into exclusive mode(default) and shared(which need to be marked).
Leaking a reference counts looks like attempting to fetch a second
reference to a controller and this WARNs and returns -EBUSY.
Fix by releasing it at the end of the function.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
ret = mipi_dsi_lcd_init(mipi_dsi, setting);
if (ret) {
dev_err(dev, "failed to init mipi dsi lcd\n");
- return ret;
+ goto out;
}
dev_info(dev, "MIPI DSI dispdv inited\n");
+out:
+ reset_control_put(reset);
return ret;
}