Commit 816985d4 authored by Bojan Prtvar's avatar Bojan Prtvar Committed by Dave Airlie

drm/radeon: fix potential NULL dereference in drivers/gpu/drm/radeon/atom.c

kzalloc() can return NULL, so I added check for it
Signed-off-by: default avatarBojan Prtvar <prtvar.b@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 69ad2ffe
...@@ -1245,6 +1245,9 @@ struct atom_context *atom_parse(struct card_info *card, void *bios) ...@@ -1245,6 +1245,9 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
char name[512]; char name[512];
int i; int i;
if (!ctx)
return NULL;
ctx->card = card; ctx->card = card;
ctx->bios = bios; ctx->bios = bios;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment