media: Fix valgrind warnings
media: Fix valgrind warnings

valgrind has no way to know that the kernel will fill links and pads
arrays passed to an ioctl through __user pointers. Allocate the arrays
with calloc() to make sure they get initialized. This also fixes the
potential integer overflow.

Signed-off-by: Laurent Pinchart <3ded2f39a78f0d7044839546f95841842b4d7c96@ideasonboard.com>
Acked-by: Sakari Ailus <8d98c2be02a446df653daa2c00496b87f3f016e4@iki.fi>

RobertCNelson/media-ctl