projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69ad2ff
)
drm/radeon: fix potential NULL dereference in drivers/gpu/drm/radeon/atom.c
author
Bojan Prtvar
<prtvar.b@gmail.com>
Wed, 3 Aug 2011 19:51:19 +0000
(19:51 +0000)
committer
Dave Airlie
<airlied@redhat.com>
Thu, 4 Aug 2011 13:39:06 +0000
(14:39 +0100)
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>
drivers/gpu/drm/radeon/atom.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/radeon/atom.c
b/drivers/gpu/drm/radeon/atom.c
index ebdb0fdb8348ad7b217e3d46027207789e0ad67f..e88c64417a8a74feac92ec9e7e763426f96045ff 100644
(file)
--- 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;