OSDN Git Service

drm/i2c: tda998x: fix error cleanup paths
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 17 Nov 2016 23:49:43 +0000 (23:49 +0000)
committerRussell King <rmk+kernel@armlinux.org.uk>
Tue, 3 Apr 2018 11:21:54 +0000 (12:21 +0100)
commit6a765c3fe5497359c11536dfbdcf7526ccb2a33f
tree1085f03e2b884648829fe80675b006553df3f23e
parentd93ae190e2c95276caceb3642e6d541d93bba705
drm/i2c: tda998x: fix error cleanup paths

If tda998x_get_audio_ports() fails, and we requested the interrupt, we
fail to free the interrupt before returning failure.  Rework the failure
cleanup code and exit paths so that we always clean up properly after an
error, and always propagate the error code.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
drivers/gpu/drm/i2c/tda998x_drv.c