Message ID | 20190225183928.GA830@lkp-wsm-ep1 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/lima: fix memdup.cocci warnings | expand |
--- a/drivers/gpu/drm/lima/lima_sched.c +++ b/drivers/gpu/drm/lima/lima_sched.c @@ -112,10 +112,9 @@ int lima_sched_task_init(struct lima_sch { int err, i; - task->bos = kmalloc(sizeof(*bos) * num_bos, GFP_KERNEL); + task->bos = kmemdup(bos, sizeof(*bos) * num_bos, GFP_KERNEL); if (!task->bos) return -ENOMEM; - memcpy(task->bos, bos, sizeof(*bos) * num_bos); for (i = 0; i < num_bos; i++) drm_gem_object_get(&bos[i]->gem);