Skip to contentSkip to conversation

drm/layerscape: fix a signedness bug

PATCH In review Dan Carpenter 2 participants 3 messages Sep 22, 2015 – Sep 28, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/layerscape: fix a signedness bug

"index" needs to be signed for the error handling to work. Really "ret" should be an int as well.

Fixes 109eee2f2a18 ('drm/layerscape: Add Freescale DCU DRM driver')
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c +2 -1
index 82be6b8..d1e300d 100644
@@ -58,7 +58,8 @@ static void fsl_dcu_drm_plane_atomic_disable(struct drm_plane *plane,
 					     struct drm_plane_state *old_state)
 {
 	struct fsl_dcu_drm_device *fsl_dev = plane->dev->dev_private;
-	unsigned int index, value, ret;
+	unsigned int value;
+	int index, ret;
 
 	index = fsl_dcu_drm_plane_index(plane);
 	if (index < 0)
#1 lore raw

Hi,

I have posted the same patch yesterday [1].

http://permalink.gmane.org/gmane.comp.video.dri.devel/136945

Regards
Andrzej

Quoted 25 lines · Dan Carpenter

"index" needs to be signed for the error handling to work. Really "ret" should be an int as well.

Fixes 109eee2f2a18 ('drm/layerscape: Add Freescale DCU DRM driver')
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c +2 -1
index 82be6b8..d1e300d 100644
@@ -58,7 +58,8 @@ static void fsl_dcu_drm_plane_atomic_disable(struct drm_plane *plane,
 					     struct drm_plane_state *old_state)
 {
 	struct fsl_dcu_drm_device *fsl_dev = plane->dev->dev_private;
-	unsigned int index, value, ret;
+	unsigned int value;
+	int index, ret;
 
 	index = fsl_dcu_drm_plane_index(plane);
 	if (index < 0)

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel