MLK-14454: video: mipi_dsi_northwest: Fix leaking a reset_control
authorLeonard Crestez <leonard.crestez@nxp.com>
Wed, 15 Mar 2017 14:34:45 +0000 (16:34 +0200)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:36 +0000 (15:21 -0500)
commitd7205cd00c18a83415362cebb1b86bdf1bf4eb9e
tree15d8e587293fe1ddf68ff6100f4718c6dd26a1dc
parent7ac18e2f9100c7a1877edcf1bc8801276cff758c
MLK-14454: video: mipi_dsi_northwest: Fix leaking a reset_control

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>
drivers/video/fbdev/mxc/mipi_dsi_northwest.c