Skip to content

Commit

Permalink
drm/radeon: fix potential NULL dereference in drivers/gpu/drm/radeon/…
Browse files Browse the repository at this point in the history
…atom.c

kzalloc() can return NULL, so I added check for it

Signed-off-by: Bojan Prtvar <prtvar.b@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Bojan Prtvar authored and Dave Airlie committed Aug 4, 2011
1 parent 69ad2ff commit 816985d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/radeon/atom.c
Original file line number Diff line number Diff line change
@@ -1245,6 +1245,9 @@ struct atom_context *atom_parse(struct card_info *card, void *bios)
char name[512];
int i;

if (!ctx)
return NULL;

ctx->card = card;
ctx->bios = bios;

0 comments on commit 816985d

Please sign in to comment.