On Thu, Oct 30, 2025 at 03:05:16PM +0100, Boris Brezillon wrote:
> +static int panthor_ioctl_bo_sync(struct drm_device *ddev, void *data,
> +                              struct drm_file *file)
> +{
> +     struct drm_panthor_bo_sync *args = data;
> +     struct drm_panthor_bo_sync_op *ops;
> +     struct drm_gem_object *obj;
> +     int ret = 0;

Not needed initialization.

> +
> +     ret = PANTHOR_UOBJ_GET_ARRAY(ops, &args->ops);
> +     if (ret)
> +             return ret;
> +
> +     for (u32 i = 0; i < args->ops.count; i++) {
> +             obj = drm_gem_object_lookup(file, ops[i].handle);
> +             if (!obj) {
> +                     ret = -ENOENT;
> +                     goto err_ops;
> +             }
> +
> +             ret = panthor_gem_sync(obj, ops[i].type, ops[i].offset,
> +                                    ops[i].size);
> +
> +             drm_gem_object_put(obj);
> +
> +             if (ret)
> +                     goto err_ops;
> +     }
> +
> +err_ops:
> +     kvfree(ops);
> +
> +     return ret;
> +}

Reply via email to