|
@@ -755,7 +755,7 @@ int drm_legacy_addbufs_agp(struct drm_device *dev,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
- entry->buflist = kzalloc(count * sizeof(*entry->buflist), GFP_KERNEL);
|
|
|
|
|
|
+ entry->buflist = kcalloc(count, sizeof(*entry->buflist), GFP_KERNEL);
|
|
if (!entry->buflist) {
|
|
if (!entry->buflist) {
|
|
mutex_unlock(&dev->struct_mutex);
|
|
mutex_unlock(&dev->struct_mutex);
|
|
atomic_dec(&dev->buf_alloc);
|
|
atomic_dec(&dev->buf_alloc);
|