Skip to contentSkip to conversation

drm: radeon: check kzalloc() result

PATCH Applied Kulikov Vasiliy 1 participant 1 message Jul 16, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/15 drm: radeon: check kzalloc() result

If kzalloc() fails exit with -ENOMEM.

---
 drivers/gpu/drm/radeon/r300.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/r300.c +2 -0
index 7e81db5..767c109 100644
@@ -1176,6 +1176,8 @@ int r300_cs_parse(struct radeon_cs_parser *p)
 	int r;
 
 	track = kzalloc(sizeof(*track), GFP_KERNEL);
+	if (track == NULL)
+		return -ENOMEM;
 	r100_cs_track_clear(p->rdev, track);
 	p->track = track;
 	do {
Signature · 1 line
1.7.0.4