Re: [PATCH 1/4] drivers/gpu/drm/vmwgfx: Fix k.alloc switched arguments

From: Matt Turner
Date: Sun Oct 31 2010 - 19:52:55 EST


On Sun, Oct 31, 2010 at 6:33 PM, Joe Perches <joe@xxxxxxxxxxx> wrote:
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c     |    2 +-
>  drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
> index a01c47d..29113c9 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
> @@ -557,7 +557,7 @@ int vmw_kms_init_legacy_display_system(struct vmw_private *dev_priv)
>                return -EINVAL;
>        }
>
> -       dev_priv->ldu_priv = kmalloc(GFP_KERNEL, sizeof(*dev_priv->ldu_priv));
> +       dev_priv->ldu_priv = kmalloc(sizeof(*dev_priv->ldu_priv), GFP_KERNEL);
>
>        if (!dev_priv->ldu_priv)
>                return -ENOMEM;
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c b/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
> index df2036e..f1a52f9 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c
> @@ -585,7 +585,7 @@ int vmw_overlay_init(struct vmw_private *dev_priv)
>                return -ENOSYS;
>        }
>
> -       overlay = kmalloc(GFP_KERNEL, sizeof(*overlay));
> +       overlay = kmalloc(sizeof(*overlay), GFP_KERNEL);
>        if (!overlay)
>                return -ENOMEM;
>
> --
> 1.7.3.1.g432b3.dirty

Oh! That's a bad one.

Reviewed-by: Matt Turner <mattst88@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/