]> git.baikalelectronics.ru Git - kernel.git/commit
[media] media: ti-vpe: vpe: Return NULL for invalid buffer type
authorNikhil Devshatwar <nikhil.nd@ti.com>
Fri, 18 Nov 2016 23:20:19 +0000 (21:20 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 22 Nov 2016 09:03:34 +0000 (07:03 -0200)
commit9e70389e0bf728c7fd3adaa68ac3dfb14b55b945
tree154e9284473dea3c3928f553b574c2e7988f77df
parent89d8d319db8ccec7ab4584cca8eb0ffd3417900a
[media] media: ti-vpe: vpe: Return NULL for invalid buffer type

get_q_data can be called with different values for type
e.g. vpe_try_crop calls it with the buffer type which gets passed
from user space

Framework doesn't check wheather its correct type or not
If user space passes wrong type, kernel should not crash.
Return NULL when the passed type is invalid.

Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/ti-vpe/vpe.c