[PATCH 5.2 139/413] media: staging: davinci: fix memory leaks and check for allocation failure