From d86febea13dfb89f118ede60f0c3edb5f104b7de Mon Sep 17 00:00:00 2001 From: hwangjae lee Date: Wed, 10 Oct 2018 20:43:55 +0900 Subject: [PATCH] [COMMON] fbdev: dpu: Added code to check if variable is NULL prevent 232754, 232758. Change-Id: I36e40c1aeb0eb5cdeada77c7e541b0682833e5aa Signed-off-by: hwangjae lee --- drivers/video/fbdev/exynos/dpu20/dpp_drv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/exynos/dpu20/dpp_drv.c b/drivers/video/fbdev/exynos/dpu20/dpp_drv.c index 39061a32c5ce..9d01f0762574 100644 --- a/drivers/video/fbdev/exynos/dpu20/dpp_drv.c +++ b/drivers/video/fbdev/exynos/dpu20/dpp_drv.c @@ -510,10 +510,15 @@ err: static long dpp_subdev_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) { struct dpp_device *dpp = v4l2_get_subdevdata(sd); - bool reset = (bool)arg; + bool reset; int ret = 0; int *afbc_enabled; + if (arg == NULL) + return -1; + else + reset = (bool)arg; + switch (cmd) { case DPP_WIN_CONFIG: dpp->dpp_config = (struct dpp_config *)arg; -- 2.20.1