Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;