driver:gpu: return -ENOMEM on allocation failure.
authorAllen Pais <[email protected]>
Wed, 13 Sep 2017 07:32:12 +0000 (13:02 +0530)
committerDaniel Vetter <[email protected]>
Thu, 12 Oct 2017 17:55:21 +0000 (19:55 +0200)
Signed-off-by: Allen Pais <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/gma500/mid_bios.c

index d75ecb3bdee7464d4ce2092c1bebda753b733b84..1fa163373a4713bcf01eb6afc0990ef6bd64b2b5 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);