drm/panel: boe-tv101wum-nl6: Fix errors cases handling in prepare function
Subsystems (3)
PATCH 1/1 drm/panel: boe-tv101wum-nl6: Fix errors cases handling in prepare function
Make sure that pp3300 regulator and enable gpio are cleaned before leave in error cases.
Fixes 18c58153b8c62 ("drm/panel: boe-tv101wum-nl6: Support enabling a 3.3V rail")
Signed-off-by Benjamin Gaignard <[email protected]>
--- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +5 -2
@@ -1245,11 +1245,11 @@ static int boe_panel_prepare(struct drm_panel *panel) ret =regulator_enable (boe->pp3300);if (ret <0 ) -return ret; + goto disablegpio; ret =regulator_enable (boe->pp1800);if (ret <0 ) -return ret; + goto poweroff3v3;usleep_range (3000 ,5000 );
@@ -1286,6 +1286,9 @@ static int boe_panel_prepare(struct drm_panel *panel) poweroff1v8:usleep_range (5000 ,7000 );regulator_disable (boe->pp1800); +poweroff3v3: +regulator_disable (boe->pp3300); +disablegpio:gpiod_set_value (boe->enable_gpio,0 );return ret;
Signature · 1 line
2.32.0