[PATCH 3.11 059/208] drm/radeon: check for 0 count in speaker allocation and SAD code
Luis Henriques
luis.henriques at canonical.com
Mon Jan 13 15:58:20 UTC 2014
3.11.10.3 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher at amd.com>
commit b67ce39a30976171e7b96b30a94a0216ab89df97 upstream.
If there is no speaker allocation block or SAD block, bail
early.
bug:
https://bugs.freedesktop.org/show_bug.cgi?id=72283
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
[ luis: backported to 3.11:
- applied changes to evergreen_hdmi_write_sad_regs() function only ]
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/gpu/drm/radeon/evergreen_hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c
index 869b4d6..7a0e347 100644
--- a/drivers/gpu/drm/radeon/evergreen_hdmi.c
+++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c
@@ -88,7 +88,7 @@ static void evergreen_hdmi_write_sad_regs(struct drm_encoder *encoder)
}
sad_count = drm_edid_to_sad(radeon_connector->edid, &sads);
- if (sad_count < 0) {
+ if (sad_count <= 0) {
DRM_ERROR("Couldn't read SADs: %d\n", sad_count);
return;
}
--
1.8.3.2
More information about the kernel-team
mailing list