summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2020-05-28 09:41:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-21 11:53:01 +0300
commitf577bac9515124c5077b1cb95f1ced40e53d201f (patch)
treee9ce1eeaffb7247e09d73d7085a35b2977ef4ea2 /drivers/media
parentd4e8eb46dd704bceced662c5bc5994ede03cec1f (diff)
downloadlinux-f577bac9515124c5077b1cb95f1ced40e53d201f.tar.xz
media: exynos4-is: Add missed check for pinctrl_lookup_state()
[ Upstream commit 18ffec750578f7447c288647d7282c7d12b1d969 ] fimc_md_get_pinctrl() misses a check for pinctrl_lookup_state(). Add the missed check to fix it. Fixes: 4163851f7b99 ("[media] s5p-fimc: Use pinctrl API for camera ports configuration]") Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/exynos4-is/media-dev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index 4f5586a4cbff..31cc7d94064e 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -1172,6 +1172,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;
}