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

Commit aaac2913 authored by Abhijit Kulkarni's avatar Abhijit Kulkarni
Browse files

msm: mdss: fix use of uninitialized local variable



This change fixes unitilized local variable being used and
checks for the valid format in concurrent writeback case before
using the format parameters.

CRs-Fixed: 1110015
Change-Id: I61a3e20af1d0a4db7a7db454ae35b810639744ae
Signed-off-by: default avatarAbhijit Kulkarni <kabhijit@codeaurora.org>
parent 314869eb
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -521,6 +521,10 @@ int mdss_mdp_writeback_prepare_cwb(struct mdss_mdp_ctl *ctl,
	 * updating img_width with buffer->planes[0].stride
	 */
	fmt = mdss_mdp_get_format_params(buffer->format);
	if (!fmt) {
		pr_err("invalid format for cwb\n");
		return -EINVAL;
	}
	mdss_mdp_get_plane_sizes(fmt, ctx->img_width,
			buffer->height, &ps, 0, 0);

+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -5279,7 +5279,7 @@ static int pp_hist_collect(struct mdp_histogram_data *hist,
				u32 block)
{
	int ret = 0;
	u32 sum;
	int sum = 0;
	char __iomem *v_base = NULL;
	unsigned long flag;
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();