drm: radeon: check kzalloc() result
If kzalloc() fails exit with -ENOMEM. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
committed by
Dave Airlie
parent
1e8655f873
commit
bbb642f9c9
@@ -1177,6 +1177,8 @@ int r300_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 == NULL)
|
||||||
|
return -ENOMEM;
|
||||||
r100_cs_track_clear(p->rdev, track);
|
r100_cs_track_clear(p->rdev, track);
|
||||||
p->track = track;
|
p->track = track;
|
||||||
do {
|
do {
|
||||||
|
Reference in New Issue
Block a user