* [patch] drm/radeon: check kmalloc() for failures
@ 2012-05-15 8:56 Dan Carpenter
2012-05-15 14:34 ` Michel Dänzer
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-05-15 8:56 UTC (permalink / raw)
To: David Airlie
Cc: kernel-janitors, Michel Dänzer, dri-devel, Jerome Glisse,
Alex Deucher, Dave Airlie
We can just return -ENOMEM here if the allocation fails.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 0874a6d..fb44e7e 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -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 {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] drm/radeon: check kmalloc() for failures
2012-05-15 8:56 [patch] drm/radeon: check kmalloc() for failures Dan Carpenter
@ 2012-05-15 14:34 ` Michel Dänzer
0 siblings, 0 replies; 2+ messages in thread
From: Michel Dänzer @ 2012-05-15 14:34 UTC (permalink / raw)
To: Dan Carpenter; +Cc: kernel-janitors, dri-devel
On Die, 2012-05-15 at 11:56 +0300, Dan Carpenter wrote:
> 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>
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-15 14:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 8:56 [patch] drm/radeon: check kmalloc() for failures Dan Carpenter
2012-05-15 14:34 ` Michel Dänzer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox