driver:gpu: return -ENOMEM on allocation failure.
authorAllen Pais <allen.lkml@gmail.com>
Wed, 13 Sep 2017 07:32:12 +0000 (13:02 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 12 Oct 2017 17:55:21 +0000 (19:55 +0200)
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1505287939-14106-3-git-send-email-allen.lkml@gmail.com
drivers/gpu/drm/gma500/mid_bios.c

index d75ecb3..1fa1633 100644 (file)
@@ -237,7 +237,7 @@ static int mid_get_vbt_data_r10(struct drm_psb_private *dev_priv, u32 addr)
 
        gct = kmalloc(sizeof(*gct) * vbt.panel_count, GFP_KERNEL);
        if (!gct)
-               return -1;
+               return -ENOMEM;
 
        gct_virtual = ioremap(addr + sizeof(vbt),
                        sizeof(*gct) * vbt.panel_count);