From: hwangjae lee Date: Wed, 10 Oct 2018 11:43:55 +0000 (+0900) Subject: [COMMON] fbdev: dpu: Added code to check if variable is NULL X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d86febea13dfb89f118ede60f0c3edb5f104b7de;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fbdev: dpu: Added code to check if variable is NULL prevent 232754, 232758. Change-Id: I36e40c1aeb0eb5cdeada77c7e541b0682833e5aa Signed-off-by: hwangjae lee --- 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;