From: Allen Pais Date: Wed, 13 Sep 2017 07:32:12 +0000 (+0530) Subject: driver:gpu: return -ENOMEM on allocation failure. X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d9d7a3ef4747ec79854b32b0bd98d2da910c2563;p=linux.git driver:gpu: return -ENOMEM on allocation failure. Signed-off-by: Allen Pais Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1505287939-14106-3-git-send-email-allen.lkml@gmail.com --- diff --git a/drivers/gpu/drm/gma500/mid_bios.c b/drivers/gpu/drm/gma500/mid_bios.c index d75ecb3bdee74..1fa163373a471 100644 --- a/drivers/gpu/drm/gma500/mid_bios.c +++ b/drivers/gpu/drm/gma500/mid_bios.c @@ -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);