mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04: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
1 changed files with 2 additions and 0 deletions
|
|
@ -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 a new issue