[PATCH] drm/bridge: analogix: anx78xx: Check return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux