Skip to content

Commit

Permalink
drm: radeon: check kzalloc() result
Browse files Browse the repository at this point in the history
If kzalloc() fails exit with -ENOMEM.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Kulikov Vasiliy authored and Dave Airlie committed Jul 20, 2010
1 parent 1e8655f commit bbb642f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/radeon/r300.c
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,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 {
Expand Down

0 comments on commit bbb642f

Please sign in to comment.