Skip to contentSkip to conversation

media: exynos4-is: add the missed check for pinctrl_lookup_state

PATCH Superseded Chuhong Yuan 1 participant 1 message May 27, 2020

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: exynos4-is: add the missed check for pinctrl_lookup_state

From: Chuhong Yuan <[email protected]>

fimc_md_get_pinctrl() misses a check for pinctrl_lookup_state(). Add the missed check to fix it.

---
 drivers/media/platform/exynos4-is/media-dev.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/media/platform/exynos4-is/media-dev.c +3 -0
index 9aaf3b8060d5..9c31d950cddf 100644
@@ -1270,6 +1270,9 @@ static int fimc_md_get_pinctrl(struct fimc_md *fmd)
 
 	pctl->state_idle = pinctrl_lookup_state(pctl->pinctrl,
 					PINCTRL_STATE_IDLE);
+	if (IS_ERR(pctl->state_idle))
+		return PTR_ERR(pctl->state_idle);
+
 	return 0;
 }
 
Signature · 1 line
2.26.2