drm/gma500: use NULL instead of using plain integer as pointer
diff mbox series

Message ID 1615969652-80225-1-git-send-email-yang.lee@linux.alibaba.com
State Accepted
Commit 8f214d435607ac67648f5df54d3f8148073fbe13
Headers show
Series
  • drm/gma500: use NULL instead of using plain integer as pointer
Related show

Commit Message

Yang Li March 17, 2021, 8:27 a.m. UTC
This fixes the following sparse warnings:
drivers/gpu/drm/gma500/psb_drv.c:303:56: warning: Using plain integer as
NULL pointer

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/gpu/drm/gma500/psb_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Patrik Jakobsson March 19, 2021, 3:04 p.m. UTC | #1
On Wed, Mar 17, 2021 at 9:27 AM Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> This fixes the following sparse warnings:
> drivers/gpu/drm/gma500/psb_drv.c:303:56: warning: Using plain integer as
> NULL pointer
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

Applied to drm-misc-next

Thanks
Patrik

> ---
>  drivers/gpu/drm/gma500/psb_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
> index 0bcab06..c2aab62 100644
> --- a/drivers/gpu/drm/gma500/psb_drv.c
> +++ b/drivers/gpu/drm/gma500/psb_drv.c
> @@ -303,7 +303,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
>
>         ret = -ENOMEM;
>
> -       dev_priv->mmu = psb_mmu_driver_init(dev, 1, 0, 0);
> +       dev_priv->mmu = psb_mmu_driver_init(dev, 1, 0, NULL);
>         if (!dev_priv->mmu)
>                 goto out_err;
>
> --
> 1.8.3.1
>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 0bcab06..c2aab62 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -303,7 +303,7 @@  static int psb_driver_load(struct drm_device *dev, unsigned long flags)
 
 	ret = -ENOMEM;
 
-	dev_priv->mmu = psb_mmu_driver_init(dev, 1, 0, 0);
+	dev_priv->mmu = psb_mmu_driver_init(dev, 1, 0, NULL);
 	if (!dev_priv->mmu)
 		goto out_err;