diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-05-15 12:56:59 +0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-17 14:13:03 +0400 |
commit | ce0679136678a58cbeca40acd84b6a0462637454 (patch) | |
tree | b75ecd45dba9025053ff1b182b32ad7aa3fac58f | |
parent | bffd9de0297702566e6aec0678c7ebc3806fe3db (diff) | |
download | linux-ce0679136678a58cbeca40acd84b6a0462637454.tar.xz |
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>
-rw-r--r-- | drivers/gpu/drm/radeon/r100.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 0874a6dd411f..fb44e7e49083 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 { |