media: coda/imx-vdoa: Check for platform_get_resource() error
authorFabio Estevam <fabio.estevam@nxp.com>
Thu, 17 Aug 2017 00:14:07 +0000 (20:14 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 12:26:53 +0000 (08:26 -0400)
commita874aabef9337f26c589858e7ea0ec6a6adbb129
tree9ad7dbb4c3bf914ffe4fc28066c540cab10d7c0e
parentd088c3107e9718ca3271277693f80a42d4effe51
media: coda/imx-vdoa: Check for platform_get_resource() error

platform_get_resource() may fail and in this case a NULL dereference
will occur.

Prevent this from happening by returning an error on
platform_get_resource() failure.

Fixes: b0444f18e0b18abce ("[media] coda: add i.MX6 VDOA driver")

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/coda/imx-vdoa.c