mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-19 09:04:51 +08:00
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;
|
||||
|
||||
track = kzalloc(sizeof(*track), GFP_KERNEL);
|
||||
if (!track)
|
||||
return -ENOMEM;
|
||||
r100_cs_track_clear(p->rdev, track);
|
||||
p->track = track;
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user