drm/radeon: check kmalloc() for failures

We can just return -ENOMEM here if the allocation fails.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dan Carpenter 2012-05-15 11:56:59 +03:00 committed by Dave Airlie
parent bffd9de029
commit ce06791366

View File

@ -2008,6 +2008,8 @@ int r100_cs_parse(struct radeon_cs_parser *p)
int r;
track = kzalloc(sizeof(*track), GFP_KERNEL);
if (!track)
return -ENOMEM;
r100_cs_track_clear(p->rdev, track);
p->track = track;
do {