media: videobuf2: Fix IS_ERR checking in vb2_vmalloc_put_userptr()
authorMa Ke <make_ruc2021@163.com>
Tue, 3 Oct 2023 09:13:15 +0000 (17:13 +0800)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 13 Oct 2023 09:33:22 +0000 (11:33 +0200)
commitfeec1b29d7a81be3c1a0a0865eed67d05d4089c9
tree093f969704ca90997cf1949c617bd7f56b04e3c6
parentbe521bf7bfad4e4bd4c3e1d2853aeb563a1e51d6
media: videobuf2: Fix IS_ERR checking in vb2_vmalloc_put_userptr()

In order to avoid error pointers from frame_vector_pages(), we could
use IS_ERR() to check the return value to fix this. This checking
operation could make sure that vector contains pages.

Signed-off-by: Ma Ke <make_ruc2021@163.com>
Acked-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil: add space between ){]
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/common/videobuf2/videobuf2-vmalloc.c