mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 08:02:07 +00:00
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: Bojan Prtvar <prtvar.b@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
69ad2ffe57
commit
816985d4f9
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user