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:
parent
bffd9de029
commit
ce06791366
|
@ -2008,6 +2008,8 @@ int r100_cs_parse(struct radeon_cs_parser *p)
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
track = kzalloc(sizeof(*track), GFP_KERNEL);
|
track = kzalloc(sizeof(*track), GFP_KERNEL);
|
||||||
|
if (!track)
|
||||||
|
return -ENOMEM;
|
||||||
r100_cs_track_clear(p->rdev, track);
|
r100_cs_track_clear(p->rdev, track);
|
||||||
p->track = track;
|
p->track = track;
|
||||||
do {
|
do {
|
||||||
|
|
Loading…
Reference in New Issue