|
@@ -1117,8 +1117,7 @@ static int drm_legacy_addbufs_sg(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);
|