drm/radeon: check kmalloc() for failures
Subsystems (3)
PATCH 1/1 drm/radeon: check kmalloc() for failures
We can just return -ENOMEM here if the allocation fails.
Signed-off-by Dan Carpenter <[email protected]>
drivers/gpu/drm/radeon/r100.c +2 -0
@@ -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 {
Quoted 3 lines · Dan Carpenter
We can just return
-ENOMEMhere if the allocation fails.Signed-off-by Dan Carpenter <[email protected]>
Reviewed-by Michel Dänzer <[email protected]>
Signature · 2 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer