summaryrefslogtreecommitdiff
authorTellen Yu <tellen.yu@amlogic.com>2018-03-29 08:37:36 (GMT)
committer Gerrit Code Review <gituser@droid04>2018-03-29 08:37:36 (GMT)
commit1da309964d5b9ddcfea5d196725b390d47dc9f8d (patch)
tree590eeeae20033b30b6e97e59069578ee3021d7e6
parent3ea0bef262ee17c936c4fa0e6d1f2120e3bbd4b4 (diff)
parent3aa102aaee48e8b38a7698caf7daaa1694268689 (diff)
downloadcommon-1da309964d5b9ddcfea5d196725b390d47dc9f8d.zip
common-1da309964d5b9ddcfea5d196725b390d47dc9f8d.tar.gz
common-1da309964d5b9ddcfea5d196725b390d47dc9f8d.tar.bz2
Merge "codec_mm: clear scatter cache when codec_mm_codec_in failed" into ampere-20180311
Diffstat
-rw-r--r--drivers/amlogic/media/common/codec_mm/codec_mm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/amlogic/media/common/codec_mm/codec_mm.c b/drivers/amlogic/media/common/codec_mm/codec_mm.c
index c221e18..814e545 100644
--- a/drivers/amlogic/media/common/codec_mm/codec_mm.c
+++ b/drivers/amlogic/media/common/codec_mm/codec_mm.c
@@ -572,7 +572,7 @@ struct codec_mm_s *codec_mm_alloc(const char *owner, int size,
mem->align2n = align2n;
mem->flags = memflags;
ret = codec_mm_alloc_in(mgt, mem);
- if (ret == -10003 &&
+ if (ret < 0 &&
mgt->alloced_for_sc_cnt > 0 && /*have used for scatter.*/
!(memflags & CODEC_MM_FLAGS_FOR_SCATTER)) {
/*if not scatter, free scatter caches. */