* [PATCH] Fix potential NULL dereference in drivers/gpu/drm/radeon/atom.c
@ 2011-08-03 19:51 Bojan Prtvar
0 siblings, 0 replies; only message in thread
From: Bojan Prtvar @ 2011-08-03 19:51 UTC (permalink / raw)
To: airlied
Cc: alexdeucher, airlied, akpm, dri-devel, linux-kernel,
kernel-janitors, Bojan Prtvar
kzalloc() can return NULL, so I added check for it
Signed-off-by: Bojan Prtvar <prtvar.b@gmail.com>
---
drivers/gpu/drm/radeon/atom.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
index ebdb0fd..e88c644 100644
--- a/drivers/gpu/drm/radeon/atom.c
+++ b/drivers/gpu/drm/radeon/atom.c
@@ -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;
--
1.7.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-08-03 19:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03 19:51 [PATCH] Fix potential NULL dereference in drivers/gpu/drm/radeon/atom.c Bojan Prtvar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox