Commit ce067913 authored by Dan Carpenter's avatar Dan Carpenter Committed by Dave Airlie

drm/radeon: check kmalloc() for failures

We can just return -ENOMEM here if the allocation fails.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent bffd9de0
...@@ -2008,6 +2008,8 @@ int r100_cs_parse(struct radeon_cs_parser *p) ...@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment