msm: vidc: Validate userspace buffer count

Makesure the number of buffers count is less than
the maximum limit to avoid structure overflow errors.

Signed-off-by: Pachika, Vikas Reddy <vpachi@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: vidc: Validate userspace buffer count before using it

Validate the number of buffers count variable before
using it to avoid structure overflow error.

Signed-off-by: Pachika, Vikas Reddy <vpachi@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Merge branch 'mainstream' of https://github.com/emceethemouth/kernel_linux-3.4.y into mainstream

Signed-off-by: Jean Francis Dominique S. Mabalot <jfdsmabalot@redhat.com>