diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-05-15 11:56:59 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-17 11:13:03 +0100 |
commit | ce0679136678a58cbeca40acd84b6a0462637454 (patch) | |
tree | b75ecd45dba9025053ff1b182b32ad7aa3fac58f /drivers/gpu/drm/radeon | |
parent | bffd9de0297702566e6aec0678c7ebc3806fe3db (diff) | |
download | blackbird-op-linux-ce0679136678a58cbeca40acd84b6a0462637454.tar.gz blackbird-op-linux-ce0679136678a58cbeca40acd84b6a0462637454.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-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 { |