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

Commit 229581ea authored by Harsh Sahu's avatar Harsh Sahu
Browse files

msm: sde: fix to handle invalid format in sde rotator



Fix to handle any invalid format in sde rotator driver
by returning NULL for any unsupported format.

Change-Id: I2ee058b2dafb9d03b4a939f39d15c2714dbc6053
Signed-off-by: default avatarHarsh Sahu <hsahu@codeaurora.org>
parent d5311c5d
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012, 2015-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012, 2015-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
@@ -507,10 +507,15 @@ struct sde_mdp_format_params *sde_get_format_params(u32 format)
	if (!fmt_found) {
		for (i = 0; i < ARRAY_SIZE(sde_mdp_format_ubwc_map); i++) {
			fmt = &sde_mdp_format_ubwc_map[i].mdp_format;
			if (format == fmt->format)
			if (format == fmt->format) {
				fmt_found = true;
				break;
			}
		}
	}
	/* If format not supported than return NULL */
	if (!fmt_found)
		fmt = NULL;

	return fmt;
}