diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-04-27 07:06:58 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-04-27 07:06:58 -0700 |
| commit | 5a2c0c09ea8f48e3ed2791a7c78e6f0b9a79f135 (patch) | |
| tree | 53649bf3f4a8a371f8bdab63d07bc25ef149006e | |
| parent | d8a07d98dc718a28522f7653b7799cac3dd21f15 (diff) | |
| parent | 229581ea83f22167aad0fb50933d056c827b6fd0 (diff) | |
Merge "msm: sde: fix to handle invalid format in sde rotator"
| -rw-r--r-- | drivers/media/platform/msm/sde/rotator/sde_rotator_formats.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/platform/msm/sde/rotator/sde_rotator_formats.c b/drivers/media/platform/msm/sde/rotator/sde_rotator_formats.c index 3b36b6bc76de..5eaa2910228e 100644 --- a/drivers/media/platform/msm/sde/rotator/sde_rotator_formats.c +++ b/drivers/media/platform/msm/sde/rotator/sde_rotator_formats.c @@ -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; } |
