[PATCH] drm: drm_edid_to_sad: fix declaration warning

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

 



CC [M]  drivers/gpu/drm/drm_edid.o
drivers/gpu/drm/drm_edid.c: In function ‘drm_edid_to_sad’:
drivers/gpu/drm/drm_edid.c:2549:4: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

Reported-by: Dieter Nützel <dieter@xxxxxxxxxxxxx>
Signed-off-by: Rafał Miłecki <zajec5@xxxxxxxxx>
---
 drivers/gpu/drm/drm_edid.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 89ae211..5d3c902 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2545,9 +2545,10 @@ int drm_edid_to_sad(struct edid *edid, struct cea_sad **sads)
 		u8 *db = &cea[i];
 
 		if (cea_db_tag(db) == AUDIO_BLOCK) {
-			dbl = cea_db_payload_len(db);
 			int j;
 
+			dbl = cea_db_payload_len(db);
+
 			count = dbl / 3; /* SAD is 3B */
 			*sads = kcalloc(count, sizeof(**sads), GFP_KERNEL);
 			if (!*sads)
-- 
1.7.10.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[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