diff mbox

drm/layerscape: fix a signedness bug

Message ID 20150922123104.GB27407@mwanda (mailing list archive)
State Deferred
Headers show

Commit Message

Dan Carpenter Sept. 22, 2015, 12:31 p.m. UTC
"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')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Andrzej Hajda Sept. 22, 2015, 12:55 p.m. UTC | #1
Hi,

I have posted the same patch yesterday [1].

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

Regards
Andrzej

On 09/22/2015 02:31 PM, Dan Carpenter wrote:
> "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')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
> index 82be6b8..d1e300d 100644
> --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
> +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
> @@ -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
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
Dan Carpenter Sept. 28, 2015, 9:38 p.m. UTC | #2
On Tue, Sep 22, 2015 at 02:55:09PM +0200, Andrzej Hajda wrote:
> Hi,
> 
> I have posted the same patch yesterday [1].
> 
> http://permalink.gmane.org/gmane.comp.video.dri.devel/136945
> 

We seem to be sending duplicates.  I sent another duplicate today.

Could you CC kernel-janitors on static checker fixes so I can monitor
what fixes you send?

regards,
dan carpenter
diff mbox

Patch

diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
index 82be6b8..d1e300d 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
@@ -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)