[PATCH] drm/bridge: analogix: anx78xx: Check return value
From: Artem Chernyshev
Date: Fri Oct 13 2023 - 10:48:27 EST
In anx78xx_start() err value of anx78xx_clear_bits()
overwriting without check.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Artem Chernyshev <artem.chernyshev@xxxxxxxxxxx>
---
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
index 800555aef97f..c966e661b9b9 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
@@ -537,6 +537,10 @@ static int anx78xx_start(struct anx78xx *anx78xx)
SP_POWERDOWN_CTRL_REG,
SP_HDCP_PD | SP_AUDIO_PD | SP_VIDEO_PD |
SP_LINK_PD);
+ if (err) {
+ DRM_ERROR("Failed to clear bits: %d\n", err);
+ goto err_poweroff;
+ }
err = anx78xx_enable_interrupts(anx78xx);
if (err) {
--
2.37.3