Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f874e20 authored by Dhaval Patel's avatar Dhaval Patel Committed by Harsh Sahu
Browse files

msm: mdss: add null check before dereferencing src_fmt



Add null check before dereferencing the src_fmt
during layer validation.

Change-Id: I6482dc3d21fdc3e570fd53022e2fb9427668d939
Signed-off-by: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent 8e698876
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -852,7 +852,7 @@ static int __validate_layer_reconfig(struct mdp_input_layer *layer,
	 */
	if (pipe->csc_coeff_set != layer->color_space) {
		src_fmt = mdss_mdp_get_format_params(layer->buffer.format);
		if (pipe->src_fmt->is_yuv && src_fmt->is_yuv) {
		if (pipe->src_fmt->is_yuv && src_fmt && src_fmt->is_yuv) {
			status = -EPERM;
			pr_err("csc change is not permitted on used pipe\n");
		}