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

This commit is contained in:
Linux Build Service Account 2017-04-27 07:06:58 -07:00 committed by Gerrit - the friendly Code Review server
commit 5a2c0c09ea

View file

@ -1,4 +1,4 @@
/* 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;
}