media: tegra-cec: fix messy probe() cleanup
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 21 Oct 2017 08:37:49 +0000 (04:37 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Oct 2017 11:23:52 +0000 (07:23 -0400)
commit3ddad1ae10c23a700e060edab11eb13ec01ea380
tree8f05f2ad6a6cad664d1704346843c91e666a0ff6
parent6981d6e55c70b831acf8bea99545adcf940949b5
media: tegra-cec: fix messy probe() cleanup

The probe() cleanup code ('goto foo_error') was very messy. It appears
that this code wasn't updated when I switched to the devm_ functions
in an earlier version.

Update the code to use 'return error' where it can and do proper cleanup
where it needs to.

Note that the original code wasn't buggy, it was just messy.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/tegra-cec/tegra_cec.c