From cbbefc671f8610886ac3c6c05fc0a25d8728d397 Mon Sep 17 00:00:00 2001 From: Robby Cai Date: Fri, 7 May 2021 17:57:17 +0800 Subject: [PATCH] LF-2856 media: ipu: Fix Coverity Issue: 17672 Dereference before null check Fixed dereference before NULL check issue Signed-off-by: Robby Cai Reviewed-by: G.n. Zhou --- drivers/media/platform/mxc/capture/ipu_still.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/mxc/capture/ipu_still.c b/drivers/media/platform/mxc/capture/ipu_still.c index 4930e79b4edc..4432cb3ee085 100644 --- a/drivers/media/platform/mxc/capture/ipu_still.c +++ b/drivers/media/platform/mxc/capture/ipu_still.c @@ -224,9 +224,9 @@ int prp_still_deselect(void *private) cam_data *cam = (cam_data *) private; int err = 0; - err = prp_still_stop(cam); - if (cam) { + err = prp_still_stop(cam); + cam->csi_start = NULL; cam->csi_stop = NULL; } -- 2.17.1