diff options
| author | Hans Verkuil <[email protected]> | 2021-11-11 11:56:29 +0100 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2021-11-30 12:07:36 +0100 |
| commit | 89ab2d39643e5ce2b122baa1e76176d1bd984cec (patch) | |
| tree | 87c7a55e7d9a965ba12a67b332963f2cf74d7168 /tools/perf/scripts/python/exported-sql-viewer.py | |
| parent | fadecf79cf8ef9bd3b8dcd0a82455b2c94c4d5c7 (diff) | |
media: vb2: frame_vector.c: don't overwrite error code
get_vaddr_frames() first calls pin_user_pages_fast() and if
that fails tries follow_pfn(). But if that also fails, then
the error code from pin_user_pages_fast() is overwritten with
the error code from follow_pfn().
Specifically if pin_user_pages_fast() returns -ENOMEM, then
follow_pfn() will overwrite that with -EINVAL, which is very
confusing.
So store the error code from pin_user_pages_fast() and return
that if follow_pfn() returns -EINVAL. -EINVAL indicates that
the page is unsuitable for follow_pfn, so pin_user_pages_fast()
was the correct call to make, and that error code should be
returned instead.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions